feat(logging): 调整不同环境的日志配置
- 移除 application-office.yaml 和 application-prod.yaml 中的 logging.file 配置 - 在 logback-spring.xml 中统一配置多环境日志输出 - 合并 dev,test,stage,default,prod,office 环境的日志 appender 引用 - 删除针对 prod 和 office 环境的独立日志级别配置 - 保留 gRPC 和异步日志输出方式 - 确保 com.jeelowcode 包在所有环境中使用 INFO 级别日志
This commit is contained in:
@@ -37,11 +37,6 @@ spring:
|
||||
database: 0 # 数据库索引
|
||||
# password: 123456 # 密码,建议生产环境开启
|
||||
|
||||
|
||||
logging:
|
||||
file:
|
||||
name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
|
||||
|
||||
--- #################### 芋道相关配置 ####################
|
||||
|
||||
# 芋道配置项,设置当前项目所有自定义的配置
|
||||
|
||||
@@ -37,10 +37,6 @@ spring:
|
||||
# database: 10 # 数据库索引
|
||||
# password: 123456 # 密码,建议生产环境开启
|
||||
|
||||
|
||||
logging:
|
||||
file:
|
||||
name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
|
||||
--- #################### 芋道相关配置 ####################
|
||||
|
||||
# 芋道配置项,设置当前项目所有自定义的配置
|
||||
|
||||
@@ -67,21 +67,12 @@
|
||||
</root>
|
||||
</springProfile>
|
||||
<!-- 其它环境 -->
|
||||
<springProfile name="dev,test,stage,default">
|
||||
<springProfile name="dev,test,stage,default,prod,office">
|
||||
<root level="INFO">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
<appender-ref ref="ASYNC"/>
|
||||
<appender-ref ref="GRPC"/>
|
||||
</root>
|
||||
</springProfile>
|
||||
<!-- 单独对设备网环境、办公网环境进行配置 -->
|
||||
<springProfile name="prod,office">
|
||||
<root level="WARN">
|
||||
<appender-ref ref="ASYNC"/>
|
||||
<appender-ref ref="GRPC"/>
|
||||
</root>
|
||||
<!-- 特定业务包使用INFO级别 -->
|
||||
<logger name="com.jeelowcode" level="INFO"/>
|
||||
</springProfile>
|
||||
|
||||
</configuration>
|
||||
|
||||
Reference in New Issue
Block a user