mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 23:00:55 +03:00
switch to viper for configuration and use cobra for cli
This commit is contained in:
@@ -11,6 +11,7 @@ package logger
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"runtime"
|
||||
|
||||
"github.com/rs/zerolog"
|
||||
lumberjack "gopkg.in/natefinch/lumberjack.v2"
|
||||
@@ -44,7 +45,7 @@ func InitLogger(logFilePath string, logMaxSize int, logMaxBackups int, logMaxAge
|
||||
consoleOutput := zerolog.ConsoleWriter{
|
||||
Out: os.Stdout,
|
||||
TimeFormat: dateFormat,
|
||||
NoColor: true,
|
||||
NoColor: runtime.GOOS == "windows",
|
||||
}
|
||||
consoleLogger = zerolog.New(consoleOutput).With().Timestamp().Logger().Level(level)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user