This is an automated email from the ASF dual-hosted git repository.

alexstocks pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git


The following commit(s) were added to refs/heads/develop by this push:
     new f233b3a5d fix: AddCallerSkip fix for default zap logger (#2887)
f233b3a5d is described below

commit f233b3a5d8e5f733a6f0554ac1592f12371cdd98
Author: Tom <[email protected]>
AuthorDate: Wed May 21 18:06:50 2025 +0800

    fix: AddCallerSkip fix for default zap logger (#2887)
---
 logger/core/zap/zap.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/logger/core/zap/zap.go b/logger/core/zap/zap.go
index e3be7d1f6..d63dcc3dc 100644
--- a/logger/core/zap/zap.go
+++ b/logger/core/zap/zap.go
@@ -94,7 +94,7 @@ func NewDefault() *dubbogoLogger.DubboLogger {
        encoder := zapcore.NewConsoleEncoder(encoderConfig())
        zapAtomicLevel := zap.NewAtomicLevelAt(zapcore.InfoLevel)
        lg = zap.New(zapcore.NewCore(encoder, zapcore.AddSync(os.Stdout), 
zapAtomicLevel),
-               zap.AddCaller(), zap.AddCallerSkip(2)).Sugar()
+               zap.AddCaller(), zap.AddCallerSkip(1)).Sugar()
        return &dubbogoLogger.DubboLogger{Logger: lg, DynamicLevel: 
zapAtomicLevel}
 }
 

Reply via email to