创建log文件夹 并且求改日志目录为log文件夹

This commit is contained in:
pixel
2019-11-01 14:04:48 +08:00
parent 27ee856e31
commit d3c2f92e19
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ func InitLog() {
}
QMLog.Out = src
QMLog.SetLevel(logrus.DebugLevel)
apiLogPath := "api.log"
apiLogPath := "./log/api.log"
logWriter, err := rotatelogs.New(
apiLogPath+".%Y-%m-%d-%H-%M.log",
rotatelogs.WithLinkName(apiLogPath), // 生成软链,指向最新日志文件