aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/bootnode
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-02-22 22:58:00 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-02-23 18:16:46 +0800
commit23a5d64fd059bb8bdf02781608a15b8b1bdbdfd2 (patch)
tree143cd04a9fe002b25c146e7c0b5aacfbe62092eb /cmd/bootnode
parent61e6bb12478740d614c8effd330f881f962b7b84 (diff)
downloaddexon-23a5d64fd059bb8bdf02781608a15b8b1bdbdfd2.tar.gz
dexon-23a5d64fd059bb8bdf02781608a15b8b1bdbdfd2.tar.zst
dexon-23a5d64fd059bb8bdf02781608a15b8b1bdbdfd2.zip
accounts, cmd: port packages over to the new logging system
Diffstat (limited to 'cmd/bootnode')
-rw-r--r--cmd/bootnode/main.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/cmd/bootnode/main.go b/cmd/bootnode/main.go
index f8cc77f83..31b2726be 100644
--- a/cmd/bootnode/main.go
+++ b/cmd/bootnode/main.go
@@ -56,28 +56,28 @@ func main() {
natm, err := nat.Parse(*natdesc)
if err != nil {
- log.Crit(fmt.Sprintf("-nat: %v", err))
+ log.Crit("Failed to parse requested NAT", "error", err)
}
switch {
case *genKey != "":
nodeKey, err = crypto.GenerateKey()
if err != nil {
- log.Crit(fmt.Sprintf("could not generate key: %v", err))
+ log.Crit("Failed to generate new key", "error", err)
}
if err = crypto.SaveECDSA(*genKey, nodeKey); err != nil {
- log.Crit(fmt.Sprintf("%v", err))
+ log.Crit("Failed to save generated key", "error", err)
}
case *nodeKeyFile == "" && *nodeKeyHex == "":
- log.Crit(fmt.Sprintf("Use -nodekey or -nodekeyhex to specify a private key"))
+ log.Crit("Use -nodekey or -nodekeyhex to load a private key")
case *nodeKeyFile != "" && *nodeKeyHex != "":
- log.Crit(fmt.Sprintf("Options -nodekey and -nodekeyhex are mutually exclusive"))
+ log.Crit("Options -nodekey and -nodekeyhex are mutually exclusive")
case *nodeKeyFile != "":
if nodeKey, err = crypto.LoadECDSA(*nodeKeyFile); err != nil {
- log.Crit(fmt.Sprintf("-nodekey: %v", err))
+ log.Crit("Failed to loading the key file", "path", *nodeKeyFile, "error", err)
}
case *nodeKeyHex != "":
if nodeKey, err = crypto.HexToECDSA(*nodeKeyHex); err != nil {
- log.Crit(fmt.Sprintf("-nodekeyhex: %v", err))
+ log.Crit("Failed to parse the key hex", "hex", *nodeKeyHex, "error", err)
}
}
@@ -90,17 +90,17 @@ func main() {
if *netrestrict != "" {
restrictList, err = netutil.ParseNetlist(*netrestrict)
if err != nil {
- log.Crit(fmt.Sprintf("-netrestrict: %v", err))
+ log.Crit("Failed to parse the network restrictions", "error", err)
}
}
if *runv5 {
if _, err := discv5.ListenUDP(nodeKey, *listenAddr, natm, "", restrictList); err != nil {
- log.Crit(fmt.Sprintf("%v", err))
+ log.Crit("Failed to start the v5 discovery protocol", "error", err)
}
} else {
if _, err := discover.ListenUDP(nodeKey, *listenAddr, natm, "", restrictList); err != nil {
- log.Crit(fmt.Sprintf("%v", err))
+ log.Crit("Failed to start the discovery protocol", "error", err)
}
}