diff --git a/common/middleware/logger.go b/common/middleware/logger.go index 0b8d2870..a69ca623 100644 --- a/common/middleware/logger.go +++ b/common/middleware/logger.go @@ -3,7 +3,6 @@ package middleware import ( "bufio" "bytes" - "encoding/json" "fmt" "go-admin/common" gaConfig "go-admin/config" @@ -57,16 +56,16 @@ func LoggerToFile() gin.HandlerFunc { return } - rt, bl := c.Get("result") + //rt, bl := c.Get("result") var result = "" - if bl { - rb, err := json.Marshal(rt) - if err != nil { - log.Warnf("json Marshal result error, %s", err.Error()) - } else { - result = string(rb) - } - } + //if bl { + // rb, err := json.Marshal(rt) + // if err != nil { + // log.Warnf("json Marshal result error, %s", err.Error()) + // } else { + // result = string(rb) + // } + //} st, bl := c.Get("status") var statusBus = 0 @@ -132,4 +131,4 @@ func SetDBOperLog(c *gin.Context, clientIP string, statusCode int, reqUri string log.Errorf("Append message error, %s", err.Error()) } } -} +} \ No newline at end of file