+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
package main
import (
blobSigningKey []byte
systemAuthToken string
debugLogf func(string, ...interface{})
+
+ ManagementToken string
}
var theConfig = DefaultConfig()
+const rfc3339NanoFixed = "2006-01-02T15:04:05.000000000Z07:00"
+
// DefaultConfig returns the default configuration.
func DefaultConfig() *Config {
return &Config{
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)