From cac3cefd98bb1419cb3679a640f4505025901e71 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Wed, 11 May 2016 23:24:26 -0400 Subject: [PATCH] set log level. use p2p config --- cmd/tendermint/main.go | 4 ++++ node/node.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/tendermint/main.go b/cmd/tendermint/main.go index 9b2def73f..7dd2ea902 100644 --- a/cmd/tendermint/main.go +++ b/cmd/tendermint/main.go @@ -6,6 +6,7 @@ import ( . "github.com/tendermint/go-common" cfg "github.com/tendermint/go-config" + "github.com/tendermint/go-logger" tmcfg "github.com/tendermint/tendermint/config/tendermint" "github.com/tendermint/tendermint/node" "github.com/tendermint/tendermint/version" @@ -33,6 +34,9 @@ Commands: config = tmcfg.GetConfig("") parseFlags(config, args[1:]) // Command line overrides + // set the log level + logger.SetLogLevel(config.GetString("log_level")) + switch args[0] { case "node": node.RunNode(config) diff --git a/node/node.go b/node/node.go index d9b548091..3d2c91966 100644 --- a/node/node.go +++ b/node/node.go @@ -113,7 +113,7 @@ func NewNode(config cfg.Config, privValidator *types.PrivValidator, getProxyApp } // Make p2p network switch - sw := p2p.NewSwitch(config) + sw := p2p.NewSwitch(config.GetConfig("p2p")) sw.AddReactor("MEMPOOL", mempoolReactor) sw.AddReactor("BLOCKCHAIN", bcReactor) sw.AddReactor("CONSENSUS", consensusReactor)