From 474034ea8dc81ff154c4aae761b1aae81c7e768b Mon Sep 17 00:00:00 2001 From: YenchangChan Date: Tue, 21 May 2024 14:01:30 +0800 Subject: [PATCH] perf: log caller --- util/common.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/common.go b/util/common.go index 902c9289..713308ee 100644 --- a/util/common.go +++ b/util/common.go @@ -242,7 +242,7 @@ func InitLogger(newLogPaths []string) { zapcore.NewMultiWriteSyncer(syncers...), logAtomLevel, ) - Logger = zap.New(core, zap.AddStacktrace(zap.ErrorLevel)) + Logger = zap.New(core, zap.AddStacktrace(zap.ErrorLevel), zap.AddCaller()) } func SetLogLevel(newLogLevel string) {