优化配置
parent
fcdc20a63d
commit
1c162969ee
@ -1,22 +1,40 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<include resource="org/springframework/boot/logging/logback/base.xml"/>
|
<include resource="org/springframework/boot/logging/logback/base.xml"/>
|
||||||
|
|
||||||
<logger name="org.springframework.web" level="INFO"/>
|
<logger name="org.springframework.web" level="INFO"/>
|
||||||
<logger name="org.springboot.sample" level="TRACE"/>
|
|
||||||
|
|
||||||
<!-- 开发、测试环境 -->
|
<!-- 开发环境 -->
|
||||||
<springProfile name="dev,test,local">
|
<springProfile name="dev,local">
|
||||||
<logger name="org.springframework.web" level="DEBUG"/>
|
<logger name="org.springframework.web" level="INFO"/>
|
||||||
<logger name="org.springboot.sample" level="DEBUG"/>
|
<logger name="org.springboot.sample" level="INFO"/>
|
||||||
<logger name="com.supervision" level="DEBUG"/>
|
<logger name="com.supervision" level="DEBUG"/>
|
||||||
<logger name="org.springframework.scheduling" level="DEBUG"/>
|
<logger name="org.springframework.scheduling" level="INFO"/>
|
||||||
</springProfile>
|
</springProfile>
|
||||||
|
|
||||||
<!-- 生产环境 -->
|
<!-- 测试环境,生产环境 -->
|
||||||
<springProfile name="prod">
|
<springProfile name="test,prod">
|
||||||
<logger name="org.springframework.web" level="ERROR"/>
|
<logger name="org.springframework.web" level="INFO"/>
|
||||||
<logger name="org.springboot.sample" level="ERROR"/>
|
<logger name="org.springboot.sample" level="INFO"/>
|
||||||
<logger name="com.supervision" level="INFO"/>
|
<logger name="com.supervision" level="INFO"/>
|
||||||
|
<logger name="org.springframework.scheduling" level="INFO"/>
|
||||||
|
<root level="INFO">
|
||||||
|
<appender name="DAILY_LOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<!-- 服务器中当天的日志 -->
|
||||||
|
<file>/data/vp/log/virtual-patient.log</file>
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<!-- 服务器归档日志 -->
|
||||||
|
<fileNamePattern>/data/vp/log/history/virtual-patient-%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
</rollingPolicy>
|
||||||
|
<encoder>
|
||||||
|
<pattern>%date [%thread] %-5level %logger{35} - %msg%n</pattern>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
</root>
|
||||||
</springProfile>
|
</springProfile>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</configuration>
|
</configuration>
|
Loading…
Reference in New Issue