规划记录全局记录请求的中间件 && 响应数据记录到上下文

This commit is contained in:
2022-07-14 11:01:06 +08:00
parent 846873e7cd
commit 6e455f43af
5 changed files with 78 additions and 18 deletions

24
middleware/access_log.go Normal file
View File

@ -0,0 +1,24 @@
// Package middleware ...
//
// Description : middleware ...
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 2022-07-14 10:53
package middleware
import (
"github.com/gin-gonic/gin"
"go.uber.org/zap"
)
// Access 记录请求日志
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 10:55 2022/7/14
func Access(logger *zap.Logger) gin.HandlerFunc {
return func(ctx *gin.Context) {
}
}