123456789101112131415161718192021222324 |
- package middleware
- import (
- "cicv-data-closedloop/common/config/c_log"
- "github.com/gin-gonic/gin"
- )
- func LogRequest() gin.HandlerFunc {
- return func(c *gin.Context) {
- clientIP := c.ClientIP()
- requestPath := c.Request.URL.Path
-
- c_log.GlobalLogger.Infof("客户端 %v 发送请求 %v", clientIP, requestPath)
-
- c.Next()
- }
- }
|