Skip to content

Commit 42487fb

Browse files
committed
fix: 去除 zap 配置中的 MessageKey 兼容性问题,最新版本已经修复
1 parent f9f7381 commit 42487fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kratos/zap/zap.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ func New(opts ...Option) *zap.Logger {
7777
cfg := zap.NewProductionConfig()
7878

7979
// 防止 kratos log 的 key 重复; took https://github.com/go-kratos/kratos/issues/1722
80+
// cfg.EncoderConfig.MessageKey = "" // Updated@2025-03-14 msg key lost; took https://github.com/go-kratos/kratos/pull/3171
8081
cfg.EncoderConfig.TimeKey = ""
81-
cfg.EncoderConfig.MessageKey = ""
8282
cfg.EncoderConfig.CallerKey = ""
8383
// 默认输出到 stdout
8484
cfg.OutputPaths = []string{"stdout"}

0 commit comments

Comments
 (0)