Skip to content

Commit

Permalink
chore: add caller skip to logging
Browse files Browse the repository at this point in the history
  • Loading branch information
kashalls committed Oct 23, 2024
1 parent 7a45cf1 commit d282d9f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cmd/webhook/init/log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func Init() {

// Build the logger
var err error
logger, err = config.Build()
logger, err = config.Build(zap.AddCallerSkip(1))
if err != nil {
panic(err)
}
Expand All @@ -46,19 +46,19 @@ func Init() {
}

func Info(message string, fields ...zap.Field) {
logger.Info(message, fields...)
logger.Info(message, fields...)
}

func Debug(message string, fields ...zap.Field) {
logger.Debug(message, fields...)
logger.Debug(message, fields...)
}

func Error(message string, fields ...zap.Field) {
logger.Error(message, fields...)
logger.Error(message, fields...)
}

func Fatal(message string, fields ...zap.Field) {
logger.Fatal(message, fields...)
logger.Fatal(message, fields...)
}

func With(fields ...zap.Field) *zap.Logger {
Expand Down

0 comments on commit d282d9f

Please sign in to comment.