about summary refs log tree commit diff
path: root/tools/nixery/server/logs.go
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-10-05T21·33+0100
committerVincent Ambo <github@tazj.in>2019-10-06T22·05+0100
commit6912658c72291caefd7c7ea6312a35c3a686cf61 (patch)
tree47f41a4cb8ee9d1e7f3eda998471f1578d557e2d /tools/nixery/server/logs.go
parent95abb1bcde75253aa35669eed26f734d02c6a870 (diff)
feat(server): Use hash of Nixery source as version
Uses a hash of Nixery's sources as the version displayed when Nixery
launches or logs an error. This makes it possible to distinguish
between errors logged from different versions.

The source hashes should be reproducible between different checkouts
of the same source tree.
Diffstat (limited to 'tools/nixery/server/logs.go')
-rw-r--r--tools/nixery/server/logs.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/nixery/server/logs.go b/tools/nixery/server/logs.go
index 55e0a13a03ea..9d1f17aed5cf 100644
--- a/tools/nixery/server/logs.go
+++ b/tools/nixery/server/logs.go
@@ -27,7 +27,6 @@ type reportLocation struct {
 
 var nixeryContext = serviceContext{
 	Service: "nixery",
-	Version: "TODO(tazjin)", // angry?
 }
 
 // isError determines whether an entry should be logged as an error
@@ -63,6 +62,7 @@ func (f stackdriverFormatter) Format(e *log.Entry) ([]byte, error) {
 }
 
 func init() {
+	nixeryContext.Version = version
 	log.SetReportCaller(true)
 	log.SetFormatter(stackdriverFormatter{})
 }