Ver código fonte

etcdmain: print out version information on startup

Xiang Li 10 anos atrás
pai
commit
6b77c146ec
1 arquivos alterados com 6 adições e 0 exclusões
  1. 6 0
      etcdmain/etcd.go

+ 6 - 0
etcdmain/etcd.go

@@ -45,6 +45,7 @@ import (
 	"github.com/coreos/etcd/pkg/types"
 	"github.com/coreos/etcd/pkg/types"
 	"github.com/coreos/etcd/proxy"
 	"github.com/coreos/etcd/proxy"
 	"github.com/coreos/etcd/rafthttp"
 	"github.com/coreos/etcd/rafthttp"
+	"github.com/coreos/etcd/version"
 )
 )
 
 
 type dirType string
 type dirType string
@@ -89,6 +90,11 @@ func Main() {
 
 
 	var stopped <-chan struct{}
 	var stopped <-chan struct{}
 
 
+	plog.Infof("etcd Version: %s\n", version.Version)
+	plog.Infof("Git SHA: %s\n", version.GitSHA)
+	plog.Infof("Go Version: %s\n", runtime.Version())
+	plog.Infof("Go OS/Arch: %s/%s\n", runtime.GOOS, runtime.GOARCH)
+
 	GoMaxProcs := 1
 	GoMaxProcs := 1
 	if envMaxProcs, err := strconv.Atoi(os.Getenv("GOMAXPROCS")); err == nil {
 	if envMaxProcs, err := strconv.Atoi(os.Getenv("GOMAXPROCS")); err == nil {
 		GoMaxProcs = envMaxProcs
 		GoMaxProcs = envMaxProcs