all: disable log message colors outside of geth

Also tweak behaviour so colors are only enabled when stderr is a terminal.
This commit is contained in:
Felix Lange
2017-02-23 19:31:13 +01:00
parent 43362ab4fb
commit d0eba23af3
11 changed files with 38 additions and 27 deletions

View File

@ -27,7 +27,7 @@ import (
func init() {
// Initialize the logger
log.Root().SetHandler(log.LvlFilterHandler(log.LvlInfo, log.StreamHandler(os.Stderr, log.TerminalFormat())))
log.Root().SetHandler(log.LvlFilterHandler(log.LvlInfo, log.StreamHandler(os.Stderr, log.TerminalFormat(false))))
// Initialize the goroutine count
runtime.GOMAXPROCS(runtime.NumCPU())