@@ -28,7 +28,6 @@ func main() {
// 如果需要同时将日志写入文件和控制台,请使用以下代码。
gin.DefaultWriter = io.MultiWriter(f, os.Stdout)
r.Use(gin.LoggerWithFormatter(func(param gin.LogFormatterParams) string {
// your custom format
return fmt.Sprintf("%s - [%s] \"%s %s %d \" %s\"\n",
param.ClientIP,
The note is not visible to the blocked user.