From 3a607f96a3b102aacd4e24ba334442c099890cce Mon Sep 17 00:00:00 2001 From: Dan Cech Date: Fri, 14 Apr 2017 01:45:36 -0400 Subject: [PATCH] fix bug in log sprintf calls (#8124) --- pkg/log/log.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/log/log.go b/pkg/log/log.go index fe0b312db23..f69d0f6b9b4 100644 --- a/pkg/log/log.go +++ b/pkg/log/log.go @@ -34,7 +34,7 @@ func New(logger string, ctx ...interface{}) Logger { func Trace(format string, v ...interface{}) { var message string if len(v) > 0 { - message = fmt.Sprintf(format, v) + message = fmt.Sprintf(format, v...) } else { message = format } @@ -45,7 +45,7 @@ func Trace(format string, v ...interface{}) { func Debug(format string, v ...interface{}) { var message string if len(v) > 0 { - message = fmt.Sprintf(format, v) + message = fmt.Sprintf(format, v...) } else { message = format } @@ -60,7 +60,7 @@ func Debug2(message string, v ...interface{}) { func Info(format string, v ...interface{}) { var message string if len(v) > 0 { - message = fmt.Sprintf(format, v) + message = fmt.Sprintf(format, v...) } else { message = format } @@ -75,7 +75,7 @@ func Info2(message string, v ...interface{}) { func Warn(format string, v ...interface{}) { var message string if len(v) > 0 { - message = fmt.Sprintf(format, v) + message = fmt.Sprintf(format, v...) } else { message = format } @@ -88,7 +88,7 @@ func Warn2(message string, v ...interface{}) { } func Error(skip int, format string, v ...interface{}) { - Root.Error(fmt.Sprintf(format, v)) + Root.Error(fmt.Sprintf(format, v...)) } func Error2(message string, v ...interface{}) { @@ -96,7 +96,7 @@ func Error2(message string, v ...interface{}) { } func Critical(skip int, format string, v ...interface{}) { - Root.Crit(fmt.Sprintf(format, v)) + Root.Crit(fmt.Sprintf(format, v...)) } func Fatal(skip int, format string, v ...interface{}) {