mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-21 10:13:01 +00:00
fix🐛 :修复请求日志数据获取为空问题
This commit is contained in:
@@ -21,7 +21,7 @@ import (
|
||||
// LoggerToFile 日志记录到文件
|
||||
func LoggerToFile() gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
defer c.Next()
|
||||
c.Next()
|
||||
if c.Request.Method == http.MethodOptions {
|
||||
return
|
||||
}
|
||||
@@ -136,4 +136,4 @@ func SetDBOperLog(c *gin.Context, clientIP string, statusCode int, reqUri string
|
||||
serviceOperaLog.Orm = db
|
||||
serviceOperaLog.Log = log
|
||||
_ = serviceOperaLog.InsertSysOperaLog(&sysOperaLog)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user