Commit f7e66fa3 authored by 张永's avatar 张永

1

parent 7dc1b790
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<property name="LOG_BASE_PATH" value="d:/data/logs/shop" />
<include resource="org/springframework/boot/logging/logback/base.xml" />
<logger name="org" level="INFO" />
<logger name="com" level="INFO" />
<logger name="com.egolm" level="DEBUG" />
<!-- <appender name="siftingAppender" class="ch.qos.logback.classic.sift.SiftingAppender">
<discriminator>
<key>CTX_PATH</key>
<DefaultValue>shop</DefaultValue>
</discriminator>
<sift>
<appender name="rollingFileAppender"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<FileNamePattern>${LOG_BASE_PATH}/${CTX_PATH}-%d{yyyy-MM-dd}.log</FileNamePattern>
<MaxHistory>30</MaxHistory>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${CONSOLE_LOG_PATTERN}</pattern>
</encoder>
</appender>
</sift>
</appender> -->
<appender name="siftingAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${LOG_BASE_PATH}/%d{yyyy-MM-dd}/shop.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<TimeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>50MB</maxFileSize>
</TimeBasedFileNamingAndTriggeringPolicy>
<MaxHistory>30</MaxHistory>
</rollingPolicy>
<encoder>
<pattern>%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n
</pattern>
</encoder>
</appender>
<root level="INFO">
<appender-ref ref="siftingAppender" />
</root>
</configuration>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment