projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refs #11906
[arvados.git]
/
services
/
keepstore
/
config.go
diff --git
a/services/keepstore/config.go
b/services/keepstore/config.go
index b2041c30325cbfaef35bc7dbcbf25a4b2c646a4b..0a3ece41ad9d88589513c30a878f172276afd93c 100644
(file)
--- a/
services/keepstore/config.go
+++ b/
services/keepstore/config.go
@@
-1,3
+1,7
@@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
package main
import (
package main
import (
@@
-36,10
+40,14
@@
type Config struct {
blobSigningKey []byte
systemAuthToken string
debugLogf func(string, ...interface{})
blobSigningKey []byte
systemAuthToken string
debugLogf func(string, ...interface{})
+
+ ManagementToken string
}
var theConfig = DefaultConfig()
}
var theConfig = DefaultConfig()
+const rfc3339NanoFixed = "2006-01-02T15:04:05.000000000Z07:00"
+
// DefaultConfig returns the default configuration.
func DefaultConfig() *Config {
return &Config{
// DefaultConfig returns the default configuration.
func DefaultConfig() *Config {
return &Config{
@@
-68,11
+76,12
@@
func (cfg *Config) Start() error {
switch strings.ToLower(cfg.LogFormat) {
case "text":
log.SetFormatter(&log.TextFormatter{
switch strings.ToLower(cfg.LogFormat) {
case "text":
log.SetFormatter(&log.TextFormatter{
- TimestampFormat: time.RFC3339Nano,
+ FullTimestamp: true,
+ TimestampFormat: rfc3339NanoFixed,
})
case "json":
log.SetFormatter(&log.JSONFormatter{
})
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)
})
default:
return fmt.Errorf(`unsupported log format %q (try "text" or "json")`, cfg.LogFormat)