You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

24 lines
380 B

package rabbitmq
import (
"fmt"
"log"
)
type logger struct {
logging bool
}
const loggingPrefix = "gorabbit"
func (l logger) Printf(format string, v ...interface{}) {
if l.logging {
log.Printf(fmt.Sprintf("%s: %s", loggingPrefix, format), v...)
}
}
func (l logger) Println(v ...interface{}) {
if l.logging {
log.Println(loggingPrefix, fmt.Sprintf("%v", v...))
}
}