Skip to content

Commit cdea307

Browse files
committed
🐛 Update caller skip level for zapSugar in jog.go
Adjusted the zapSugar invocation in jog.go to increase the value of AddCallerSkip from 1 to 2. This change will affect the logging behavior by skipping an additional level in the call stack when determining the caller to report during log events.
1 parent f944a61 commit cdea307

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jog.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func New(level ...LogLevel) Logger {
2828
zapCfg.EncoderConfig.EncodeLevel = zapcore.CapitalColorLevelEncoder
2929
}
3030
j.zapLogger, _ = zapCfg.Build()
31-
j.zapSugar = j.zapLogger.Sugar().WithOptions(zap.AddCallerSkip(1))
31+
j.zapSugar = j.zapLogger.Sugar().WithOptions(zap.AddCallerSkip(2))
3232
instance = j
3333
return j
3434
}

0 commit comments

Comments
 (0)