Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix other sugared logger styled functions #2

Merged
merged 2 commits into from
Jul 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ require (
github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c // indirect
github.com/gorilla/mux v1.7.2
github.com/magiconair/properties v1.8.0
github.com/mattn/goveralls v0.0.2 // indirect
github.com/pkg/errors v0.8.1
github.com/sirupsen/logrus v1.4.2
github.com/smartystreets/assertions v1.0.0 // indirect
Expand All @@ -21,7 +22,6 @@ require (
github.com/urfave/cli v1.20.0
go.uber.org/zap v1.10.0
golang.org/x/crypto v0.0.0-20190618222545-ea8f1a30c443 // indirect
golang.org/x/lint v0.0.0-20190409202823-959b441ac422 // indirect
golang.org/x/net v0.0.0-20190619014844-b5b0513f8c1b // indirect
golang.org/x/sys v0.0.0-20190620070143-6f217b454f45 // indirect
golang.org/x/text v0.3.2 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/mattn/goveralls v0.0.2 h1:7eJB6EqsPhRVxvwEXGnqdO2sJI0PTsrWoTMXEk9/OQc=
github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
Expand Down
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