mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-28 04:48:44 +08:00
zap
This commit is contained in:
parent
b67ce3c462
commit
2d476021a6
@ -84,8 +84,8 @@ func (l *ZapLogger) timeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder)
|
|||||||
func (l *ZapLogger) cores() (zap.Option, error) {
|
func (l *ZapLogger) cores() (zap.Option, error) {
|
||||||
c := zap.NewProductionEncoderConfig()
|
c := zap.NewProductionEncoderConfig()
|
||||||
c.EncodeTime = zapcore.ISO8601TimeEncoder
|
c.EncodeTime = zapcore.ISO8601TimeEncoder
|
||||||
c.EncodeDuration = zapcore.SecondsDurationEncoder
|
//c.EncodeDuration = zapcore.SecondsDurationEncoder
|
||||||
c.EncodeLevel = zapcore.CapitalColorLevelEncoder
|
//c.EncodeLevel = zapcore.CapitalColorLevelEncoder
|
||||||
fileEncoder := zapcore.NewJSONEncoder(c)
|
fileEncoder := zapcore.NewJSONEncoder(c)
|
||||||
fileEncoder.AddInt("PID", os.Getpid())
|
fileEncoder.AddInt("PID", os.Getpid())
|
||||||
writer, err := l.getWriter()
|
writer, err := l.getWriter()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user