Bug fix for logger interface. Varidic arguments need to be unrolled when passed to print functions.

This commit is contained in:
Renan DelValle 2019-01-08 15:37:25 -08:00
parent 2f7015571c
commit 22b1d82d88
No known key found for this signature in database
GPG key ID: C240AD6D6F443EC9

View file

@ -40,20 +40,20 @@ func (l *LevelLogger) EnableDebug(enable bool) {
func (l LevelLogger) DebugPrintf(format string, a ...interface{}) {
if l.debug {
l.Print("[DEBUG] ")
l.Printf(format, a)
l.Printf(format, a...)
}
}
func (l LevelLogger) DebugPrint(a ...interface{}) {
if l.debug {
l.Print("[DEBUG] ")
l.Print(a)
l.Print(a...)
}
}
func (l LevelLogger) DebugPrintln(a ...interface{}) {
if l.debug {
l.Print("[DEBUG] ")
l.Println(a)
l.Println(a...)
}
}