From 36b514e63a19b4886edfb957debf7c53d846a418 Mon Sep 17 00:00:00 2001
From: xh <15868101683@163.com>
Date: Thu, 1 Jul 2021 20:58:29 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=AF=8F=E6=97=A5=E6=9C=80?=
 =?UTF-8?q?=E5=A4=A7=E6=96=87=E4=BB=B6=E6=95=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/main/resources/logback-spring.xml | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml
index a181276..9dd6dbf 100644
--- a/src/main/resources/logback-spring.xml
+++ b/src/main/resources/logback-spring.xml
@@ -52,7 +52,6 @@
     <appender name="DEBUG_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
         <!-- 正在记录的日志文件的路径及文件名~~~~~file设置打印的文件的路径及文件名,建议绝对路径-->
         <file>${logging.path}/web_debug.log</file>
-
         <!--日志文档输出格式-->
         <encoder>
             <!--指定日志格式-->
@@ -108,6 +107,7 @@
     </appender>
 
 
+
     <!-- 2.2 level为 INFO 日志,时间滚动输出  -->
     <appender name="INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
         <!-- 正在记录的日志文档的路径及文档名 -->
@@ -128,6 +128,11 @@
             <!--日志文档保留天数-->
             <maxHistory>7</maxHistory>
         </rollingPolicy>
+        <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+            <fileNamePattern>${logging.path}/web-error-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
+            <minIndex>1</minIndex>
+            <maxIndex>3</maxIndex>
+        </rollingPolicy>
         <!-- 此日志文档只记录info级别的 -->
         <filter class="ch.qos.logback.classic.filter.LevelFilter">
             <level>info</level>
-- 
2.18.1