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

@ -112,7 +112,7 @@ func init() {
}
func run(ctx *cli.Context) error {
glogger := log.NewGlogHandler(log.StreamHandler(os.Stderr, log.TerminalFormat()))
glogger := log.NewGlogHandler(log.StreamHandler(os.Stderr, log.TerminalFormat(false)))
glogger.Verbosity(log.Lvl(ctx.GlobalInt(VerbosityFlag.Name)))
log.Root().SetHandler(glogger)