Skip to content

Commit

Permalink
Merge pull request #6 from kintohub/bug/log-args
Browse files Browse the repository at this point in the history
🐛 bug(Args): log args are sent as an array vs a list of args
  • Loading branch information
Disturbing authored Jun 24, 2020
2 parents c64df27 + e2ed2f1 commit d4df2c8
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions klog/klog.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,71 +44,71 @@ func Verbose(msg string) {
}

func Verbosef(format string, args ...interface{}) {
log.Log().Msgf(format, args)
log.Log().Msgf(format, args...)
}

func Debug(msg string) {
log.Debug().Msg(msg)
}

func Debugf(format string, args ...interface{}) {
log.Debug().Msgf(format, args)
log.Debug().Msgf(format, args...)
}

func Info(msg string) {
log.Info().Msg(msg)
}

func Infof(format string, args ...interface{}) {
log.Info().Msgf(format, args)
log.Info().Msgf(format, args...)
}

func Warn(msg string) {
log.Warn().Msg(msg)
}

func Warnf(format string, args ...interface{}) {
log.Warn().Msgf(format, args)
log.Warn().Msgf(format, args...)
}

func WarnfWithErr(err error, format string, args ...interface{}) {
log.Warn().Err(err).Msgf(format, args)
log.Warn().Err(err).Msgf(format, args...)
}

func Error(msg string) {
log.Error().Msg(msg)
}

func Errorf(format string, args ...interface{}) {
log.Error().Msgf(format, args)
log.Error().Msgf(format, args...)
}

func ErrorfWithErr(err error, format string, args ...interface{}) {
log.Error().Err(err).Msgf(format, args)
log.Error().Err(err).Msgf(format, args...)
}

func Fatal(msg string) {
log.Fatal().Msg(msg)
}

func Fatalf(format string, args ...interface{}) {
log.Fatal().Msgf(format, args)
log.Fatal().Msgf(format, args...)
}

func FatalfWithErr(err error, format string, args ...interface{}) {
log.Fatal().Err(err).Msgf(format, args)
log.Fatal().Err(err).Msgf(format, args...)
}

func Panic(msg string) {
log.Panic().Msg(msg)
}

func Panicf(format string, args ...interface{}) {
log.Panic().Msgf(format, args)
log.Panic().Msgf(format, args...)
}

func PanicfWithError(err error, format string, args ...interface{}) {
log.Panic().Err(err).Msgf(format, args)
log.Panic().Err(err).Msgf(format, args...)
}

func GetLogger() zerolog.Logger {
Expand Down

0 comments on commit d4df2c8

Please sign in to comment.