aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-03-02 21:06:16 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2017-03-02 21:06:16 +0800
commit9184249b393e4e332ae6a2f5d774880a88a9bfd6 (patch)
tree7788ce54cb04d1af4fe03ab3c2447354bcaac3cc /cmd/geth
parent82e7c1d1241737fd0ae9b25e0f20857b8597b148 (diff)
downloadgo-tangerine-9184249b393e4e332ae6a2f5d774880a88a9bfd6.tar
go-tangerine-9184249b393e4e332ae6a2f5d774880a88a9bfd6.tar.gz
go-tangerine-9184249b393e4e332ae6a2f5d774880a88a9bfd6.tar.bz2
go-tangerine-9184249b393e4e332ae6a2f5d774880a88a9bfd6.tar.lz
go-tangerine-9184249b393e4e332ae6a2f5d774880a88a9bfd6.tar.xz
go-tangerine-9184249b393e4e332ae6a2f5d774880a88a9bfd6.tar.zst
go-tangerine-9184249b393e4e332ae6a2f5d774880a88a9bfd6.zip
Logger updates 3 (#3730)
* accounts, cmd, eth, ethdb: port logs over to new system * ethdb: drop concept of cache distribution between dbs * eth: fix some log nitpicks to make them nicer
Diffstat (limited to 'cmd/geth')
-rw-r--r--cmd/geth/chaincmd.go2
-rw-r--r--cmd/geth/main.go14
2 files changed, 8 insertions, 8 deletions
diff --git a/cmd/geth/chaincmd.go b/cmd/geth/chaincmd.go
index 1c21c4ded..784692261 100644
--- a/cmd/geth/chaincmd.go
+++ b/cmd/geth/chaincmd.go
@@ -117,7 +117,7 @@ func initGenesis(ctx *cli.Context) error {
if err != nil {
utils.Fatalf("failed to write genesis block: %v", err)
}
- log.Info(fmt.Sprintf("successfully wrote genesis block and/or chain rule set: %x", block.Hash()))
+ log.Info("Successfully wrote genesis state", "hash", block.Hash())
return nil
}
diff --git a/cmd/geth/main.go b/cmd/geth/main.go
index fa61f7386..79893cc04 100644
--- a/cmd/geth/main.go
+++ b/cmd/geth/main.go
@@ -29,6 +29,7 @@ import (
"github.com/ethereum/go-ethereum/accounts/keystore"
"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/common"
+ "github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/console"
"github.com/ethereum/go-ethereum/contracts/release"
"github.com/ethereum/go-ethereum/eth"
@@ -202,11 +203,10 @@ func makeFullNode(ctx *cli.Context) *node.Node {
}{uint(params.VersionMajor<<16 | params.VersionMinor<<8 | params.VersionPatch), clientIdentifier, runtime.Version(), runtime.GOOS}
extra, err := rlp.EncodeToBytes(clientInfo)
if err != nil {
- log.Warn(fmt.Sprint("error setting canonical miner information:", err))
+ log.Warn("Failed to set canonical miner information", "err", err)
}
if uint64(len(extra)) > params.MaximumExtraDataSize {
- log.Warn(fmt.Sprint("error setting canonical miner information: extra exceeds", params.MaximumExtraDataSize))
- log.Debug(fmt.Sprintf("extra: %x\n", extra))
+ log.Warn("Miner extra data exceed limit", "extra", hexutil.Bytes(extra), "limit", params.MaximumExtraDataSize)
extra = nil
}
stack := utils.MakeNode(ctx, clientIdentifier, gitCommit)
@@ -271,7 +271,7 @@ func startNode(ctx *cli.Context, stack *node.Node) {
// Open and self derive any wallets already attached
for _, wallet := range stack.AccountManager().Wallets() {
if err := wallet.Open(""); err != nil {
- log.Warn(fmt.Sprintf("Failed to open wallet %s: %v", wallet.URL(), err))
+ log.Warn("Failed to open wallet", "url", wallet.URL(), "err", err)
} else {
wallet.SelfDerive(accounts.DefaultBaseDerivationPath, stateReader)
}
@@ -280,13 +280,13 @@ func startNode(ctx *cli.Context, stack *node.Node) {
for event := range events {
if event.Arrive {
if err := event.Wallet.Open(""); err != nil {
- log.Info(fmt.Sprintf("New wallet appeared: %s, failed to open: %s", event.Wallet.URL(), err))
+ log.Warn("New wallet appeared, failed to open", "url", event.Wallet.URL(), "err", err)
} else {
- log.Info(fmt.Sprintf("New wallet appeared: %s, %s", event.Wallet.URL(), event.Wallet.Status()))
+ log.Info("New wallet appeared", "url", event.Wallet.URL(), "status", event.Wallet.Status())
event.Wallet.SelfDerive(accounts.DefaultBaseDerivationPath, stateReader)
}
} else {
- log.Info(fmt.Sprintf("Old wallet dropped: %s", event.Wallet.URL()))
+ log.Info("Old wallet dropped", "url", event.Wallet.URL())
event.Wallet.Close()
}
}