diff --git a/mylog/log.go b/mylog/log.go index 903a0b8..16e4db1 100644 --- a/mylog/log.go +++ b/mylog/log.go @@ -106,7 +106,9 @@ func NewLogger(serverName string, config *Config) *ZapLog { } func getRollingFileWriter(serverName string, config *Config) *lumberjack.Logger { - //filePath := config.LogFilePath + if config.LogFilePath == "" { + config.LogFilePath = "logs" + } return &lumberjack.Logger{ Filename: filepath.Join(config.LogFilePath, serverName+".log"),