You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2024/11/17 06:57:37 UTC
(dubbo-go) branch main updated: Fix the log that outputs inappropriate file names, function names, and line numbers (#2744)
This is an automated email from the ASF dual-hosted git repository.
alexstocks pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git
The following commit(s) were added to refs/heads/main by this push:
new 37bc5c31f Fix the log that outputs inappropriate file names, function names, and line numbers (#2744)
37bc5c31f is described below
commit 37bc5c31f1a417819c47f435443c93a4a146cb84
Author: marsevilspirit <ma...@gmail.com>
AuthorDate: Sun Nov 17 14:57:31 2024 +0800
Fix the log that outputs inappropriate file names, function names, and line numbers (#2744)
---
logger/zap/zap.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/logger/zap/zap.go b/logger/zap/zap.go
index c21d2a390..0aeb95678 100644
--- a/logger/zap/zap.go
+++ b/logger/zap/zap.go
@@ -99,7 +99,7 @@ func NewDefault() *Logger {
}
encoder := zapcore.NewConsoleEncoder(encoderConfig())
lg = zap.New(zapcore.NewCore(encoder, zapcore.AddSync(os.Stdout), lv),
- zap.AddCaller(), zap.AddCallerSkip(1)).Sugar()
+ zap.AddCaller(), zap.AddCallerSkip(2)).Sugar()
return &Logger{lg: lg}
}