mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-07-28 22:28: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) {
|
func NewStructuredLoggerFromLevel(lvl LogLevel) (SimpleLogging, error) {
|
||||||
cfg := zap.NewProductionConfig()
|
cfg := zap.NewProductionConfig()
|
||||||
|
|
||||||
|
cfg.EncoderConfig.EncodeTime = zapcore.ISO8601TimeEncoder
|
||||||
cfg.Level = zap.NewAtomicLevelAt(lvl.zLevel)
|
cfg.Level = zap.NewAtomicLevelAt(lvl.zLevel)
|
||||||
return newStructuredLogger(cfg)
|
return newStructuredLogger(cfg)
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewStructuredLogger() (SimpleLogging, error) {
|
func NewStructuredLogger() (SimpleLogging, error) {
|
||||||
cfg := zap.NewProductionConfig()
|
cfg := zap.NewProductionConfig()
|
||||||
|
cfg.EncoderConfig.EncodeTime = zapcore.ISO8601TimeEncoder
|
||||||
return newStructuredLogger(cfg)
|
return newStructuredLogger(cfg)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user