diff --git a/internal/common/logging/application.go b/internal/common/logging/application.go index ad469696549..b8c47be6c0c 100644 --- a/internal/common/logging/application.go +++ b/internal/common/logging/application.go @@ -19,7 +19,7 @@ import ( var ( defaultLogConfigPath = "config/logging.yaml" logConfigPathEnvVar = "ARMADA_LOG_CONFIG" - logTimestampFormat = "2006-01-02T15:04:05.999Z07:00" + RFC3339Milli = "2006-01-02T15:04:05.000Z07:00" ) // MustConfigureApplicationLogging sets up logging suitable for an application. Logging configuration is loaded from @@ -102,7 +102,7 @@ func createConsoleLogger(logConfig Config) (*FilteredLevelWriter, error) { level: level, writer: zerolog.ConsoleWriter{ Out: os.Stdout, - TimeFormat: logTimestampFormat, + TimeFormat: RFC3339Milli, FormatLevel: func(i interface{}) string { return strings.ToUpper(fmt.Sprintf("%s", i)) }, diff --git a/internal/common/logging/global.go b/internal/common/logging/global.go index 281ba0ad5bf..48ddfeb75ff 100644 --- a/internal/common/logging/global.go +++ b/internal/common/logging/global.go @@ -3,7 +3,6 @@ package logging import ( "github.com/rs/zerolog" "os" - "time" ) // The global Logger. Comes configured with some sensible defaults for e.g. unit tests, but applications should @@ -102,7 +101,7 @@ func WithStacktrace(err error) *Logger { func createDefaultLogger() *Logger { consoleWriter := zerolog.ConsoleWriter{ Out: os.Stdout, - TimeFormat: time.RFC3339, + TimeFormat: RFC3339Milli, NoColor: true, } zerologLogger := zerolog.New(consoleWriter).