|
|
@ -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()
|
|
|
|