-func newZapCore(level zapcore.Level, syncer zapcore.WriteSyncer) zapcore.Core {
- encoderCfg := zap.NewProductionEncoderConfig()
- encoderCfg.TimeKey = "timestamp"
- encoderCfg.EncodeTime = zapcore.ISO8601TimeEncoder
-
- return zapcore.NewCore(
- zapcore.NewConsoleEncoder(encoderCfg),
- zapcore.Lock(syncer),
- level,
- )
-}
-
-var zapLogLevel = map[string]zapcore.Level{
- "debug": zap.DebugLevel,
- "info": zap.InfoLevel,
- "warn": zap.WarnLevel,
- "error": zap.ErrorLevel,
-}
-