From 43362ab4fb561323e1a766405eaa8f82dec4a280 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Thu, 23 Feb 2017 18:42:42 +0100 Subject: [PATCH] log: disable logs by default --- log/root.go | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/log/root.go b/log/root.go index 12afbf8b7..71b8cef6d 100644 --- a/log/root.go +++ b/log/root.go @@ -2,28 +2,16 @@ package log import ( "os" - - "github.com/ethereum/go-ethereum/log/term" - "github.com/mattn/go-colorable" ) var ( - root *logger + root = &logger{[]interface{}{}, new(swapHandler)} StdoutHandler = StreamHandler(os.Stdout, LogfmtFormat()) StderrHandler = StreamHandler(os.Stderr, LogfmtFormat()) ) func init() { - if term.IsTty(os.Stdout.Fd()) { - StdoutHandler = StreamHandler(colorable.NewColorableStdout(), TerminalFormat()) - } - - if term.IsTty(os.Stderr.Fd()) { - StderrHandler = StreamHandler(colorable.NewColorableStderr(), TerminalFormat()) - } - - root = &logger{[]interface{}{}, new(swapHandler)} - root.SetHandler(LvlFilterHandler(LvlInfo, StdoutHandler)) + root.SetHandler(DiscardHandler()) } // New returns a new logger with the given context.