projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
13581: Adds log message when no instance types are configured.
[arvados.git]
/
services
/
health
/
main.go
diff --git
a/services/health/main.go
b/services/health/main.go
index b6358deefcf8d333971435b2a9ede4021bc68f54..376d4830b153b85cd82df1220902059b1aa2e4ac 100644
(file)
--- a/
services/health/main.go
+++ b/
services/health/main.go
@@
-1,7
+1,12
@@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
package main
import (
"flag"
package main
import (
"flag"
+ "fmt"
"net/http"
"git.curoverse.com/arvados.git/sdk/go/arvados"
"net/http"
"git.curoverse.com/arvados.git/sdk/go/arvados"
@@
-10,13
+15,24
@@
import (
log "github.com/Sirupsen/logrus"
)
log "github.com/Sirupsen/logrus"
)
+var version = "dev"
+
func main() {
configFile := flag.String("config", arvados.DefaultConfigFile, "`path` to arvados configuration file")
func main() {
configFile := flag.String("config", arvados.DefaultConfigFile, "`path` to arvados configuration file")
+ getVersion := flag.Bool("version", false, "Print version information and exit.")
flag.Parse()
flag.Parse()
+ // Print version information if requested
+ if *getVersion {
+ fmt.Printf("arvados-health %s\n", version)
+ return
+ }
+
log.SetFormatter(&log.JSONFormatter{
TimestampFormat: "2006-01-02T15:04:05.000000000Z07:00",
})
log.SetFormatter(&log.JSONFormatter{
TimestampFormat: "2006-01-02T15:04:05.000000000Z07:00",
})
+ log.Printf("arvados-health %s started", version)
+
cfg, err := arvados.GetConfig(*configFile)
if err != nil {
log.Fatal(err)
cfg, err := arvados.GetConfig(*configFile)
if err != nil {
log.Fatal(err)