소스 검색

Log version information on startup

Douglas Thrift 1 년 전
부모
커밋
7cd34ff6c8
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      cmd/presence/main.go

+ 8 - 0
cmd/presence/main.go

@@ -52,5 +52,13 @@ func (cli *CLI) Context() (ctx context.Context) {
 	} else {
 		ctx = log.Context(ctx)
 	}
+	log.Print(ctx,
+		log.KV{K: "presence version", V: version},
+		log.KV{K: "go version", V: runtime.Version()},
+		log.KV{K: "os", V: runtime.GOOS},
+		log.KV{K: "arch", V: runtime.GOARCH},
+		log.KV{K: "commit", V: commit},
+		log.KV{K: "date", V: date},
+	)
 	return
 }