This commit is contained in:
2026-04-21 09:55:36 +08:00
parent 2784db09eb
commit c021ffa3a2
3 changed files with 26 additions and 116 deletions

View File

@@ -52,6 +52,12 @@
<groupId>com.maibu</groupId>
<artifactId>maibu-iot-service</artifactId>
<version>${maibu.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>

View File

@@ -12,6 +12,15 @@
</encoder>
</appender>
<!-- 确保日志目录存在 -->
<statusListener class="ch.qos.logback.core.status.NopStatusListener" />
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>${log.path}/init.log</file>
<encoder>
<pattern>${log.pattern}</pattern>
</encoder>
</appender>
<!-- 系统日志输出 -->
<appender name="file_debug" class="ch.qos.logback.core.rolling.RollingFileAppender">
@@ -105,7 +114,7 @@
<appender name="execute-script" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/script/${scriptId}.log</file>
<Append>true</Append>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">-->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 按月回滚 daily -->
<fileNamePattern>${log.path}/rule.%d{yyyy-MM}.log</fileNamePattern>
<!-- 日志最大的历史 3个月 -->