mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
zap
This commit is contained in:
parent
1039d44284
commit
cce90a109d
@ -103,8 +103,11 @@ func (l *ZapLogger) cores(logLevel int, isStdout bool, isJson bool, logLocation
|
||||
} else {
|
||||
c.EncodeLevel = zapcore.CapitalColorLevelEncoder
|
||||
customCallerEncoder := func(caller zapcore.EntryCaller, enc zapcore.PrimitiveArrayEncoder) {
|
||||
// enc.AppendString("[" + l.traceId + "]")
|
||||
enc.AppendString("[" + caller.Function + "]")
|
||||
enc.AppendString("[" + caller.TrimmedPath() + "]")
|
||||
enc.AppendString("[" + caller.String() + "]")
|
||||
enc.AppendString("[" + caller.File + "]")
|
||||
enc.AppendString("[" + caller.FullPath() + "]")
|
||||
}
|
||||
c.EncodeCaller = customCallerEncoder
|
||||
fileEncoder = zapcore.NewConsoleEncoder(c)
|
||||
|
Loading…
x
Reference in New Issue
Block a user