|
@ -15,14 +15,11 @@ func init() { |
|
|
Reset() |
|
|
Reset() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// You might want to call this after resetting tendermint/go-config.
|
|
|
|
|
|
func Reset() { |
|
|
|
|
|
|
|
|
|
|
|
var logLevel string = "debug" |
|
|
|
|
|
if config != nil { |
|
|
|
|
|
logLevel = config.GetString("log_level") |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
func SetLogLevel(logLevel string) { |
|
|
|
|
|
resetWithLogLevel(logLevel) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func resetWithLogLevel(logLevel string) { |
|
|
// main handler
|
|
|
// main handler
|
|
|
//handlers := []log15.Handler{}
|
|
|
//handlers := []log15.Handler{}
|
|
|
mainHandler = log15.LvlFilterHandler( |
|
|
mainHandler = log15.LvlFilterHandler( |
|
@ -42,6 +39,17 @@ func Reset() { |
|
|
log15.Root().SetHandler(mainHandler) |
|
|
log15.Root().SetHandler(mainHandler) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// You might want to call this after resetting tendermint/go-config.
|
|
|
|
|
|
func Reset() { |
|
|
|
|
|
|
|
|
|
|
|
var logLevel string = "debug" |
|
|
|
|
|
if config != nil { |
|
|
|
|
|
logLevel = config.GetString("log_level") |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
resetWithLogLevel(logLevel) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// See go-wire/log for an example of usage.
|
|
|
// See go-wire/log for an example of usage.
|
|
|
func MainHandler() log15.Handler { |
|
|
func MainHandler() log15.Handler { |
|
|
return mainHandler |
|
|
return mainHandler |
|
|