From 9184249b393e4e332ae6a2f5d774880a88a9bfd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Thu, 2 Mar 2017 15:06:16 +0200 Subject: 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 --- cmd/swarm/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cmd/swarm/main.go') diff --git a/cmd/swarm/main.go b/cmd/swarm/main.go index 12cad328f..171677146 100644 --- a/cmd/swarm/main.go +++ b/cmd/swarm/main.go @@ -277,7 +277,7 @@ func bzzd(ctx *cli.Context) error { signal.Notify(sigc, syscall.SIGTERM) defer signal.Stop(sigc) <-sigc - log.Info(fmt.Sprint("Got sigterm, shutting down...")) + log.Info("Got sigterm, shutting swarm down...") stack.Stop() }() networkId := ctx.GlobalUint64(SwarmNetworkIdFlag.Name) @@ -342,7 +342,7 @@ func getAccount(ctx *cli.Context, stack *node.Node) *ecdsa.PrivateKey { } // Try to load the arg as a hex key file. if key, err := crypto.LoadECDSA(keyid); err == nil { - log.Info(fmt.Sprintf("swarm account key loaded: %#x", crypto.PubkeyToAddress(key.PublicKey))) + log.Info("Swarm account key loaded", "address", crypto.PubkeyToAddress(key.PublicKey)) return key } // Otherwise try getting it from the keystore. @@ -399,7 +399,7 @@ func injectBootnodes(srv *p2p.Server, nodes []string) { for _, url := range nodes { n, err := discover.ParseNode(url) if err != nil { - log.Error(fmt.Sprintf("invalid bootnode %q", err)) + log.Error("Invalid swarm bootnode", "err", err) continue } srv.AddPeer(n) -- cgit v1.2.3