From 2b918c70aea78cb8350c539c34aebd9a099b7bcf Mon Sep 17 00:00:00 2001 From: Kota Kanbe Date: Thu, 21 Jan 2021 06:38:37 +0900 Subject: [PATCH] fix(scan): config dump nocolor in debug mode. (#1141) --- util/logutil.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/logutil.go b/util/logutil.go index f657e963..a4d8c560 100644 --- a/util/logutil.go +++ b/util/logutil.go @@ -8,6 +8,7 @@ import ( "path/filepath" "runtime" + "github.com/k0kubun/pp" "github.com/rifflock/lfshook" "github.com/sirupsen/logrus" @@ -30,9 +31,9 @@ func NewCustomLogger(server config.ServerInfo) *logrus.Entry { log := logrus.New() log.Formatter = &formatter.TextFormatter{MsgAnsiColor: server.LogMsgAnsiColor} log.Level = logrus.InfoLevel - //TODO passed by arg if config.Conf.Debug { log.Level = logrus.DebugLevel + pp.ColoringEnabled = false } if flag.Lookup("test.v") != nil {