From d0eba23af373bb54b00b242ccee4239fc9afd873 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Thu, 23 Feb 2017 19:31:13 +0100 Subject: all: disable log message colors outside of geth Also tweak behaviour so colors are only enabled when stderr is a terminal. --- cmd/bootnode/main.go | 2 +- cmd/evm/main.go | 2 +- cmd/wnode/main.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'cmd') diff --git a/cmd/bootnode/main.go b/cmd/bootnode/main.go index c3fc163a1..a5e82d145 100644 --- a/cmd/bootnode/main.go +++ b/cmd/bootnode/main.go @@ -50,7 +50,7 @@ func main() { ) flag.Parse() - glogger := log.NewGlogHandler(log.StreamHandler(os.Stderr, log.TerminalFormat())) + glogger := log.NewGlogHandler(log.StreamHandler(os.Stderr, log.TerminalFormat(false))) glogger.Verbosity(log.Lvl(*verbosity)) glogger.Vmodule(*vmodule) log.Root().SetHandler(glogger) diff --git a/cmd/evm/main.go b/cmd/evm/main.go index a489efbfc..601e62f77 100644 --- a/cmd/evm/main.go +++ b/cmd/evm/main.go @@ -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) diff --git a/cmd/wnode/main.go b/cmd/wnode/main.go index 8191f9292..82d7eda3c 100644 --- a/cmd/wnode/main.go +++ b/cmd/wnode/main.go @@ -152,7 +152,7 @@ func echo() { } func initialize() { - log.Root().SetHandler(log.LvlFilterHandler(log.Lvl(*argVerbosity), log.StreamHandler(os.Stderr, log.TerminalFormat()))) + log.Root().SetHandler(log.LvlFilterHandler(log.Lvl(*argVerbosity), log.StreamHandler(os.Stderr, log.TerminalFormat(false)))) done = make(chan struct{}) var peers []*discover.Node -- cgit v1.2.3