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. --- mobile/init.go | 2 +- mobile/logger.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'mobile') diff --git a/mobile/init.go b/mobile/init.go index d7acc14ce..2025d85ed 100644 --- a/mobile/init.go +++ b/mobile/init.go @@ -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()) diff --git a/mobile/logger.go b/mobile/logger.go index 9f24b3279..7078c4fd2 100644 --- a/mobile/logger.go +++ b/mobile/logger.go @@ -24,5 +24,5 @@ import ( // SetVerbosity sets the global verbosity level (between 0 and 6 - see logger/verbosity.go). func SetVerbosity(level int) { - log.Root().SetHandler(log.LvlFilterHandler(log.Lvl(level), log.StreamHandler(os.Stderr, log.TerminalFormat()))) + log.Root().SetHandler(log.LvlFilterHandler(log.Lvl(level), log.StreamHandler(os.Stderr, log.TerminalFormat(false)))) } -- cgit