Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go/oasis-node/cmd/node: Log the version on startup #2998

Merged
merged 1 commit into from
Jun 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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