github.com/jtzjtz/kit@v1.0.2/middleware/access_log/README.md (about) 1 ### 日志中间件 2 #### 参数 3 - apolloEnv 服务启动env 4 - projectName 项目名称 如api-oms 5 - emailTaskId DTQ处理邮件发送的任务ID 6 - notifyUser 异常通知收件人邮箱 7 - notifyCc 异常通知抄件人邮箱,多个用逗号隔开 8 9 #### 调用 10 11 ```go 12 import "github.com/gin-gonic/gin" 13 import "github.com/jtzjtz/kit/middleware/access_log" 14 15 func main() { 16 r := gin.Default() 17 access_log.SetAp(30,1,false) 18 r.Use(access_log.AccessLogMiddleware(env,projectName ) 19 } 20 ```