| 10 | ) |
| 11 | |
| 12 | type AccessLog struct { |
| 13 | Path string `json:"path"` // 请求路径 |
| 14 | Method string `json:"method"` // 请求方法 |
| 15 | ReqBody string `json:"reqBody"` // 请求体内容 |
| 16 | Status int `json:"status"` // 响应状态码 |
| 17 | RespBody string `json:"respBody"` // 响应体内容 |
| 18 | Duration time.Duration `json:"duration"` // 请求处理耗时 |
| 19 | } |
| 20 | |
| 21 | type LogMiddleware struct { |
| 22 | l *zap.Logger |
nothing calls this directly
no outgoing calls
no test coverage detected