diff --git a/cmd/crowdsec-cli/main.go b/cmd/crowdsec-cli/main.go index e99fd53ab..c3a475f70 100644 --- a/cmd/crowdsec-cli/main.go +++ b/cmd/crowdsec-cli/main.go @@ -134,7 +134,7 @@ var ( func main() { // set the formatter asap and worry about level later - logFormatter := &log.TextFormatter{TimestampFormat: "02-01-2006 15:04:05", FullTimestamp: true} + logFormatter := &log.TextFormatter{TimestampFormat: "2006-01-02 15:04:05", FullTimestamp: true} log.SetFormatter(logFormatter) if err := fflag.RegisterAllFeatures(); err != nil { diff --git a/pkg/types/utils.go b/pkg/types/utils.go index 8a49c9d32..b58eda99b 100644 --- a/pkg/types/utils.go +++ b/pkg/types/utils.go @@ -46,7 +46,7 @@ func SetDefaultLoggerConfig(cfgMode string, cfgFolder string, cfgLevel log.Level } logLevel = cfgLevel log.SetLevel(logLevel) - logFormatter = &log.TextFormatter{TimestampFormat: "02-01-2006 15:04:05", FullTimestamp: true, ForceColors: forceColors} + logFormatter = &log.TextFormatter{TimestampFormat: "2006-01-02 15:04:05", FullTimestamp: true, ForceColors: forceColors} log.SetFormatter(logFormatter) return nil }