aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2017-02-24 01:42:42 +0800
committerFelix Lange <fjl@twurst.com>2017-02-27 22:32:48 +0800
commit43362ab4fb561323e1a766405eaa8f82dec4a280 (patch)
tree0264ae9d06c194a5a9136cc261e39cc954b00136
parent38e273597c283e607fd58199ed77890813f7c22c (diff)
downloadgo-tangerine-43362ab4fb561323e1a766405eaa8f82dec4a280.tar
go-tangerine-43362ab4fb561323e1a766405eaa8f82dec4a280.tar.gz
go-tangerine-43362ab4fb561323e1a766405eaa8f82dec4a280.tar.bz2
go-tangerine-43362ab4fb561323e1a766405eaa8f82dec4a280.tar.lz
go-tangerine-43362ab4fb561323e1a766405eaa8f82dec4a280.tar.xz
go-tangerine-43362ab4fb561323e1a766405eaa8f82dec4a280.tar.zst
go-tangerine-43362ab4fb561323e1a766405eaa8f82dec4a280.zip
log: disable logs by default
-rw-r--r--log/root.go16
1 files 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.