From 11461534f60e3c7d47e42dcd9503006fb4f72153 Mon Sep 17 00:00:00 2001 From: Yawning Angel Date: Wed, 10 Jun 2020 12:16:41 +0000 Subject: [PATCH] go/oasis-node/cmd/node: Log the version on startup Might as well, though it won't show up at the default log level. --- .changelog/2663.trivial.md | 3 +++ go/oasis-node/cmd/node/node.go | 7 +++++++ 2 files changed, 10 insertions(+) create mode 100644 .changelog/2663.trivial.md diff --git a/.changelog/2663.trivial.md b/.changelog/2663.trivial.md new file mode 100644 index 00000000000..271adf2b9bf --- /dev/null +++ b/.changelog/2663.trivial.md @@ -0,0 +1,3 @@ +go/oasis-node/cmd/node: Log the version on startup + +Might as well, though it won't show up at the default log level. diff --git a/go/oasis-node/cmd/node/node.go b/go/oasis-node/cmd/node/node.go index 9ed088e4db2..fd6b32146eb 100644 --- a/go/oasis-node/cmd/node/node.go +++ b/go/oasis-node/cmd/node/node.go @@ -20,6 +20,7 @@ import ( "github.com/oasisprotocol/oasis-core/go/common/logging" "github.com/oasisprotocol/oasis-core/go/common/persistent" "github.com/oasisprotocol/oasis-core/go/common/service" + "github.com/oasisprotocol/oasis-core/go/common/version" consensusAPI "github.com/oasisprotocol/oasis-core/go/consensus/api" "github.com/oasisprotocol/oasis-core/go/consensus/tendermint" tmService "github.com/oasisprotocol/oasis-core/go/consensus/tendermint/service" @@ -566,6 +567,12 @@ func newNode(testNode bool) (n *Node, err error) { // nolint: gocyclo return nil, err } + // Log the version of the binary so that we can figure out what the + // binary is from the logs. + logger.Info("Starting oasis-node", + "Version", version.SoftwareVersion, + ) + dataDir := cmdCommon.DataDir() if dataDir == "" { logger.Error("data directory not configured")