diff options
author | Vincent Ambo <tazjin@google.com> | 2019-10-05T21·48+0100 |
---|---|---|
committer | Vincent Ambo <github@tazj.in> | 2019-10-06T22·05+0100 |
commit | f77c93b6aeb3e847fe00099ea5c52dc98cf74b4d (patch) | |
tree | 15114dc7666afa10aa49b2f260d5bfee7515c54f /tools/nixery/server/main.go | |
parent | 6912658c72291caefd7c7ea6312a35c3a686cf61 (diff) |
feat(server): Add log level to severity mapping
The output format now writes a `severity` field that follows that format that should be recognised by Stackdriver Logging.
Diffstat (limited to 'tools/nixery/server/main.go')
-rw-r--r-- | tools/nixery/server/main.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/nixery/server/main.go b/tools/nixery/server/main.go index ca1f3c69f2d8..06de6a96a143 100644 --- a/tools/nixery/server/main.go +++ b/tools/nixery/server/main.go @@ -247,7 +247,10 @@ func main() { Pop: pop, } - log.Printf("Starting Nixery (version %s) on port %s\n", version, cfg.Port) + log.WithFields(log.Fields{ + "version": version, + "port": cfg.Port, + }).Info("Starting Nixery") // All /v2/ requests belong to the registry handler. http.Handle("/v2/", ®istryHandler{ |