Browse Source

生产环境日志处理

master
review512jwy@163.com 1 month ago
parent
commit
241dcfe431
  1. 2
      src/main/resources/application-prod.yml
  2. 2
      src/main/resources/logback-spring.xml

2
src/main/resources/application-prod.yml

@ -68,7 +68,7 @@ mybatis-plus:
# 驼峰下划线转换 # 驼峰下划线转换
map-underscore-to-camel-case: true map-underscore-to-camel-case: true
# 这个配置会将执行的sql打印出来,在开发或测试的时候可以用 # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl
# 安全配置 # 安全配置
security: security:

2
src/main/resources/logback-spring.xml

@ -57,7 +57,7 @@
<!-- 生产环境输出至文件 --> <!-- 生产环境输出至文件 -->
<springProfile name="prod"> <springProfile name="prod">
<root level="INFO"> <root level="INFO">
<appender-ref ref="CONSOLE"/> <!-- <appender-ref ref="CONSOLE"/>-->
<appender-ref ref="FILE"/> <appender-ref ref="FILE"/>
</root> </root>
</springProfile> </springProfile>

Loading…
Cancel
Save