Skip to content

Commit

Permalink
fix bug on init loglevel
Browse files Browse the repository at this point in the history
  • Loading branch information
hhq163 committed Dec 24, 2021
1 parent cf0a534 commit dfbe23b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ func NewCuttingLogger(config *Config) Logger {
}
writeSyncer := zapcore.AddSync(ljLogger)

loggerLevel := zap.NewAtomicLevelAt(zapcore.DebugLevel)
loggerLevel := zap.NewAtomicLevelAt(zapcore.Level(config.Level))

core := zapcore.NewCore(encoder, writeSyncer, &loggerLevel)
zapLogger := zap.New(core, zap.AddCaller(), zap.AddCallerSkip(config.CallerSkip))
Expand Down

0 comments on commit dfbe23b

Please sign in to comment.