Skip to content

Commit

Permalink
Fix other sugared logger styled functions
Browse files Browse the repository at this point in the history
  • Loading branch information
albertusdev committed Jul 2, 2019
1 parent 2e47c1c commit 38057b4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func Debug(message string, fields ...zap.Field) {

// Debugf allows Sprintf style formatting and logs at debug level
func Debugf(template string, args ...interface{}) {
getSugaredLogger().Debugf(template, args)
getSugaredLogger().Debugf(template, args...)
}

// Error logs the message at error level and prints stacktrace with additional fields, if any
Expand All @@ -82,7 +82,7 @@ func Fatal(message string, fields ...zap.Field) {

// Fatalf allows Sprintf style formatting, logs at fatal level and exits
func Fatalf(template string, args ...interface{}) {
getSugaredLogger().Fatalf(template, args)
getSugaredLogger().Fatalf(template, args...)
}

// Info logs the message at info level with additional fields, if any
Expand All @@ -92,7 +92,7 @@ func Info(message string, fields ...zap.Field) {

// Infof allows Sprintf style formatting and logs at info level
func Infof(template string, args ...interface{}) {
getSugaredLogger().Infof(template, args)
getSugaredLogger().Infof(template, args...)
}

// Warn logs the message at warn level with additional fields, if any
Expand All @@ -102,7 +102,7 @@ func Warn(message string, fields ...zap.Field) {

// Warnf allows Sprintf style formatting and logs at warn level
func Warnf(template string, args ...interface{}) {
getSugaredLogger().Warnf(template, args)
getSugaredLogger().Warnf(template, args...)
}

// AddHook adds func(zapcore.Entry) error) to the logger lifecycle
Expand Down

0 comments on commit 38057b4

Please sign in to comment.