提交 260b1c11 编写于 作者: Mr.奇淼('s avatar Mr.奇淼(

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

上级 6612e792
......@@ -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), // 生成软链,指向最新日志文件
......
{"level":"info","msg":"| 200 | 960.2µs | ::1 | GET /swagger/index.html ||","time":"2019-11-01T14:04:16+08:00"}
{"level":"info","msg":"| 304 | 0s | ::1 | GET /swagger/swagger-ui.css ||","time":"2019-11-01T14:04:16+08:00"}
{"level":"info","msg":"| 304 | 0s | ::1 | GET /swagger/swagger-ui-bundle.js ||","time":"2019-11-01T14:04:16+08:00"}
{"level":"info","msg":"| 304 | 0s | ::1 | GET /swagger/swagger-ui-standalone-preset.js ||","time":"2019-11-01T14:04:16+08:00"}
{"level":"info","msg":"| 200 | 998.3µs | ::1 | GET /swagger/doc.json ||","time":"2019-11-01T14:04:17+08:00"}
{"level":"info","msg":"| 200 | 0s | ::1 | GET /swagger/favicon-32x32.png ||","time":"2019-11-01T14:04:17+08:00"}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册