change log file mode

pull/455/head
skiffer-git 2 years ago committed by Xinwei Xiong(cubxxw-openim)
parent a5f79eae07
commit c4a5eb9cb3

@ -33,7 +33,8 @@ func loggerInit(moduleName string) *Logger {
//All logs will be printed //All logs will be printed
logger.SetLevel(logrus.Level(config.Config.Log.RemainLogLevel)) logger.SetLevel(logrus.Level(config.Config.Log.RemainLogLevel))
//Close std console output //Close std console output
src, err := os.OpenFile(os.DevNull, os.O_APPEND|os.O_WRONLY, os.ModeAppend) //os.O_WRONLY | os.O_CREATE | os.O_APPEND
src, err := os.OpenFile(os.DevNull, os.O_APPEND|os.O_RDWR|os.O_CREATE, os.ModeAppend)
if err != nil { if err != nil {
panic(err.Error()) panic(err.Error())
} }

Loading…
Cancel
Save