Skip to content

Commit

Permalink
log support stdout (#415)
Browse files Browse the repository at this point in the history
  • Loading branch information
binbin0325 authored Mar 2, 2022
1 parent 3cad874 commit 6ab22f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func InitNacosLogger(config Config) (Logger, error) {
logLevel := getLogLevel(config.Level)
encoder := getEncoder()
writer := config.getLogWriter()
core := zapcore.NewCore(zapcore.NewConsoleEncoder(encoder), writer, logLevel)
core := zapcore.NewCore(zapcore.NewConsoleEncoder(encoder), zapcore.NewMultiWriteSyncer(writer, zapcore.AddSync(os.Stdout)), logLevel)

if config.Sampling != nil {
core = zapcore.NewSamplerWithOptions(core, config.Sampling.Tick, config.Sampling.Initial, config.Sampling.Thereafter)
Expand Down

0 comments on commit 6ab22f1

Please sign in to comment.