diff options
Diffstat (limited to 'common/loggers/loggers.go')
-rw-r--r-- | common/loggers/loggers.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/common/loggers/loggers.go b/common/loggers/loggers.go index 308635fe9..2c331352a 100644 --- a/common/loggers/loggers.go +++ b/common/loggers/loggers.go @@ -17,7 +17,6 @@ import ( "bytes" "fmt" "io" - "io/ioutil" "log" "os" "regexp" @@ -92,7 +91,7 @@ type logger struct { *jww.Notepad // The writer that represents stdout. - // Will be ioutil.Discard when in quiet mode. + // Will be io.Discard when in quiet mode. out io.Writer logCounters *LogCounters @@ -232,12 +231,12 @@ func NewErrorLogger() Logger { // NewBasicLogger creates a new basic logger writing to Stdout. func NewBasicLogger(t jww.Threshold) Logger { - return newLogger(t, jww.LevelError, os.Stdout, ioutil.Discard, false) + return newLogger(t, jww.LevelError, os.Stdout, io.Discard, false) } // NewBasicLoggerForWriter creates a new basic logger writing to w. func NewBasicLoggerForWriter(t jww.Threshold, w io.Writer) Logger { - return newLogger(t, jww.LevelError, w, ioutil.Discard, false) + return newLogger(t, jww.LevelError, w, io.Discard, false) } // RemoveANSIColours removes all ANSI colours from the given string. @@ -291,7 +290,7 @@ func InitGlobalLogger(stdoutThreshold, logThreshold jww.Threshold, outHandle, lo func getLogWriters(outHandle, logHandle io.Writer) (io.Writer, io.Writer) { isTerm := terminal.PrintANSIColors(os.Stdout) - if logHandle != ioutil.Discard && isTerm { + if logHandle != io.Discard && isTerm { // Remove any Ansi coloring from log output logHandle = ansiCleaner{w: logHandle} } |