Skip to content

Commit

Permalink
fix(scan): config dump nocolor in debug mode. (#1141)
Browse files Browse the repository at this point in the history
  • Loading branch information
kotakanbe authored Jan 20, 2021
1 parent 1100c13 commit 2b918c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion util/logutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"path/filepath"
"runtime"

"github.com/k0kubun/pp"
"github.com/rifflock/lfshook"
"github.com/sirupsen/logrus"

Expand All @@ -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 {
Expand Down

0 comments on commit 2b918c7

Please sign in to comment.