X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/3afec6824121eea6aed8c2d25567a5e8974d3100..6d146b5f5f7fd6310f4ded16851c8cc02037efc8:/services/keepstore/config.go diff --git a/services/keepstore/config.go b/services/keepstore/config.go index b2041c3032..83dd84ecc0 100644 --- a/services/keepstore/config.go +++ b/services/keepstore/config.go @@ -40,6 +40,8 @@ type Config struct { var theConfig = DefaultConfig() +const rfc3339NanoFixed = "2006-01-02T15:04:05.000000000Z07:00" + // DefaultConfig returns the default configuration. func DefaultConfig() *Config { return &Config{ @@ -68,11 +70,12 @@ func (cfg *Config) Start() error { switch strings.ToLower(cfg.LogFormat) { case "text": log.SetFormatter(&log.TextFormatter{ - TimestampFormat: time.RFC3339Nano, + FullTimestamp: true, + TimestampFormat: rfc3339NanoFixed, }) case "json": log.SetFormatter(&log.JSONFormatter{ - TimestampFormat: time.RFC3339Nano, + TimestampFormat: rfc3339NanoFixed, }) default: return fmt.Errorf(`unsupported log format %q (try "text" or "json")`, cfg.LogFormat)