Skip to content

Commit

Permalink
Merge pull request #2998 from oasisprotocol/yawning/feature/2663
Browse files Browse the repository at this point in the history
go/oasis-node/cmd/node: Log the version on startup
  • Loading branch information
Yawning authored Jun 10, 2020
2 parents 3ffcef8 + 1146153 commit ce6ec47
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/2663.trivial.md
Original file line number Diff line number Diff line change
@@ -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.
7 changes: 7 additions & 0 deletions go/oasis-node/cmd/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit ce6ec47

Please sign in to comment.