From 988824f3f15ef1319184d9c8ee5d055d2ac4597a Mon Sep 17 00:00:00 2001 From: skiffer-git <44203734@qq.com> Date: Thu, 1 Sep 2022 20:51:53 +0800 Subject: [PATCH] change log file mode --- pkg/common/log/logrus.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/common/log/logrus.go b/pkg/common/log/logrus.go index b1f26855a..2514de055 100644 --- a/pkg/common/log/logrus.go +++ b/pkg/common/log/logrus.go @@ -35,7 +35,8 @@ func loggerInit(moduleName string) *Logger { //All logs will be printed logger.SetLevel(logrus.Level(config.Config.Log.RemainLogLevel)) //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 { panic(err.Error()) }