1 Star 0 Fork 218

wangxuantao/springboot2-open

forked from cowboy yu/springboot2-open 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
logback-spring.xml 1.65 KB
一键复制 编辑 原始数据 按行查看 历史
cowboy yu 提交于 2019-06-04 15:21 . 集成sentinel
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="60 seconds" debug="false">
<include resource="org/springframework/boot/logging/logback/base.xml" />
<logger name="org.springframework.web" level="DEBUG"/>
<logger name="org.springboot.sample" level="TRACE" />
<!--输出到文件 -->
<appender name="file"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>./log/console.log</file>
<append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>./logBackup/nads_%d{yyyy-MM-dd}.log.zip</fileNamePattern>
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder>
<pattern>
${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}
</pattern>
</encoder>
</appender>
<root>
<appender-ref ref="file" />
</root>
<!-- 开发、测试环境 -->
<springProfile name="dev,test">
<logger name="org.springframework.web" level="DEBUG"/>
<logger name="org.springboot.sample" level="DEBUG" />
<logger name="cn.myframe" level="INFO" />
</springProfile>
<!-- 生产环境 -->
<springProfile name="pro">
<logger name="org.springframework.web" level="DEBUG"/>
<logger name="org.springboot.sample" level="DEBUG" />
<logger name="cn.myframe" level="DEBUG" />
</springProfile>
</configuration>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wangxuantao/springboot2-open.git
git@gitee.com:wangxuantao/springboot2-open.git
wangxuantao
springboot2-open
springboot2-open
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385