日志配置

This commit is contained in:
2025-08-06 09:12:47 +08:00
parent 57f074995e
commit c2eb5ba524
6 changed files with 61 additions and 13 deletions

View File

@ -1,15 +1,15 @@
--- # 监控中心配置
spring.boot.admin.client:
# 增加客户端开关
enabled: false
enabled: true
url: http://localhost:9090/admin
instance:
service-host-type: IP
metadata:
username: ${spring.boot.admin.client.username}
userpassword: ${spring.boot.admin.client.password}
username: @monitor.username@
password: @monitor.password@
username: ${monitor.username}
password: ${monitor.password}
--- # snail-job 配置
snail-job:

View File

@ -35,7 +35,8 @@ captcha:
# 日志配置
logging:
level:
com.fuyuanshen: @logging.level@
#com.fuyuanshen: @logging.level@
com.fuyuanshen: ${logging.level}
org.springframework: warn
org.mybatis.spring.mapper: error
org.apache.fury: warn
@ -254,7 +255,7 @@ management:
health:
show-details: ALWAYS
logfile:
external-file: ./logs/sys-console.log
external-file: ./logs/sys-admin-console.log
--- # 默认/推荐使用sse推送
sse:

View File

@ -15,13 +15,13 @@
<!-- 控制台输出 -->
<appender name="file_console" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/sys-console.log</file>
<!-- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> -->
<!-- &lt;!&ndash; 日志文件名格式 &ndash;&gt; -->
<!-- <fileNamePattern>${log.path}/sys-console.%d{yyyy-MM-dd}.log</fileNamePattern> -->
<!-- &lt;!&ndash; 日志最大 1天 &ndash;&gt; -->
<!-- <maxHistory>1</maxHistory> -->
<!-- </rollingPolicy> -->
<file>${log.path}/sys-admin-console.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 日志文件名格式 -->
<fileNamePattern>${log.path}/sys-admin-console.log.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- 日志最大 1天 -->
<maxHistory>1</maxHistory>
</rollingPolicy>
<encoder>
<pattern>${log.pattern}</pattern>
<charset>utf-8</charset>