Skip to content

Commit

Permalink
update OutputPaths
Browse files Browse the repository at this point in the history
  • Loading branch information
mkilc committed May 25, 2023
1 parent b710a5f commit 7d5c377
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/logger/config.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package logger

import (
"os"

"go.uber.org/zap"
"go.uber.org/zap/zapcore"
)
Expand Down Expand Up @@ -38,8 +40,8 @@ func (c *config) GetDevelopmentConfig() LogConfig {
EncodeCaller: zapcore.ShortCallerEncoder,
EncodeName: zapcore.FullNameEncoder,
},
OutputPaths: []string{"stdout"},
ErrorOutputPaths: []string{"stderr"},
OutputPaths: []string{os.Stdout.Name()},
ErrorOutputPaths: []string{os.Stderr.Name()},
}}
}

Expand Down Expand Up @@ -67,7 +69,7 @@ func (c *config) GetProductionConfig() LogConfig {
EncodeCaller: zapcore.ShortCallerEncoder,
},
// OutputPaths: []string{"logs.log", "stdout"},
OutputPaths: []string{"stderr"},
ErrorOutputPaths: []string{"stderr"},
OutputPaths: []string{os.Stdout.Name()},
ErrorOutputPaths: []string{os.Stderr.Name()},
}}
}

0 comments on commit 7d5c377

Please sign in to comment.