mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-07-28 21:38:25 +00:00
standardised logging timestamp to ISO8601 (#1625)
Co-authored-by: T <kishore.t@lowes.com>
This commit is contained in:
@@ -74,12 +74,14 @@ type StructuredLogger struct {
|
||||
func NewStructuredLoggerFromLevel(lvl LogLevel) (SimpleLogging, error) {
|
||||
cfg := zap.NewProductionConfig()
|
||||
|
||||
cfg.EncoderConfig.EncodeTime = zapcore.ISO8601TimeEncoder
|
||||
cfg.Level = zap.NewAtomicLevelAt(lvl.zLevel)
|
||||
return newStructuredLogger(cfg)
|
||||
}
|
||||
|
||||
func NewStructuredLogger() (SimpleLogging, error) {
|
||||
cfg := zap.NewProductionConfig()
|
||||
cfg.EncoderConfig.EncodeTime = zapcore.ISO8601TimeEncoder
|
||||
return newStructuredLogger(cfg)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user