mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-14 05:03:49 +08:00
gf2版本同步升级到v2.0.4,修复验证器兼容问题
This commit is contained in:
@@ -39,6 +39,13 @@ func (s *sHook) GlobalLog(r *ghttp.Request) {
|
||||
ctx = r.Context()
|
||||
)
|
||||
|
||||
// 没有上下文的请求不记录,如:doc、favicon.ico等非服务类业务
|
||||
modelCtx := com.Context.Get(ctx)
|
||||
if modelCtx == nil {
|
||||
return
|
||||
}
|
||||
|
||||
// 计算运行耗时
|
||||
com.Context.SetTakeUpTime(ctx, gtime.TimestampMilli()-r.EnterTime)
|
||||
|
||||
go sysService.Log.AutoLog(ctx)
|
||||
|
||||
Reference in New Issue
Block a user