fix
This commit is contained in:
parent
22bf77019a
commit
8ceb818a24
@ -98,10 +98,10 @@ func LogRequest(cfg *AccessConfig) gin.HandlerFunc {
|
||||
startRequestTime := request.WrapperHandle.GetCtxIntData(ctx, handleConfig.StartRequestTimeField, 0)
|
||||
// 记录请求日志
|
||||
logData := logger.NewLogData(ctx, consts.LogTypeRequest, "", map[string]any{
|
||||
handleConfig.StartRequestTimeField: startRequestTime, // 开始请求时间
|
||||
"request_header": getLogRequestHeader(ctx, cfg), // 请求header
|
||||
"request_query": request.WrapperHandle.GetQuery(ctx), // 获取请求query
|
||||
"request_body": request.WrapperHandle.GetRequestBody(ctx), // 请求body
|
||||
handleConfig.StartRequestTimeField: startRequestTime, // 开始请求时间
|
||||
"request_header": getLogRequestHeader(ctx, cfg), // 请求header
|
||||
"request_query": request.WrapperHandle.ParseQuery(ctx), // 获取请求query
|
||||
"request_body": request.WrapperHandle.ParseBody(ctx), // 请求body
|
||||
})
|
||||
cfg.Logger.Info("接口请求日志记录", logger.ZapLogDataList(logData)...)
|
||||
ctx.Next()
|
||||
|
Loading…
Reference in New Issue
Block a user