console logger: enable colors on Windows too ...

... now that zerolog supports this feature
This commit is contained in:
Nicola Murino
2021-12-20 18:47:18 +01:00
parent 00a02dc14d
commit 8174349032
3 changed files with 3 additions and 5 deletions

View File

@@ -13,7 +13,6 @@ import (
"fmt"
"os"
"path/filepath"
"runtime"
"time"
ftpserverlog "github.com/fclairamb/go-log"
@@ -199,7 +198,6 @@ func EnableConsoleLogger(level zerolog.Level) {
consoleOutput := zerolog.ConsoleWriter{
Out: os.Stdout,
TimeFormat: dateFormat,
NoColor: runtime.GOOS == "windows",
}
consoleLogger = zerolog.New(consoleOutput).With().Timestamp().Logger().Level(level)
}