Browse Source

set log level. use p2p config

pull/220/head
Ethan Buchman 9 years ago
committed by Jae Kwon
parent
commit
cac3cefd98
2 changed files with 5 additions and 1 deletions
  1. +4
    -0
      cmd/tendermint/main.go
  2. +1
    -1
      node/node.go

+ 4
- 0
cmd/tendermint/main.go View File

@ -6,6 +6,7 @@ import (
. "github.com/tendermint/go-common" . "github.com/tendermint/go-common"
cfg "github.com/tendermint/go-config" cfg "github.com/tendermint/go-config"
"github.com/tendermint/go-logger"
tmcfg "github.com/tendermint/tendermint/config/tendermint" tmcfg "github.com/tendermint/tendermint/config/tendermint"
"github.com/tendermint/tendermint/node" "github.com/tendermint/tendermint/node"
"github.com/tendermint/tendermint/version" "github.com/tendermint/tendermint/version"
@ -33,6 +34,9 @@ Commands:
config = tmcfg.GetConfig("") config = tmcfg.GetConfig("")
parseFlags(config, args[1:]) // Command line overrides parseFlags(config, args[1:]) // Command line overrides
// set the log level
logger.SetLogLevel(config.GetString("log_level"))
switch args[0] { switch args[0] {
case "node": case "node":
node.RunNode(config) node.RunNode(config)


+ 1
- 1
node/node.go View File

@ -113,7 +113,7 @@ func NewNode(config cfg.Config, privValidator *types.PrivValidator, getProxyApp
} }
// Make p2p network switch // Make p2p network switch
sw := p2p.NewSwitch(config)
sw := p2p.NewSwitch(config.GetConfig("p2p"))
sw.AddReactor("MEMPOOL", mempoolReactor) sw.AddReactor("MEMPOOL", mempoolReactor)
sw.AddReactor("BLOCKCHAIN", bcReactor) sw.AddReactor("BLOCKCHAIN", bcReactor)
sw.AddReactor("CONSENSUS", consensusReactor) sw.AddReactor("CONSENSUS", consensusReactor)


Loading…
Cancel
Save