<?xml version="1.0" encoding="UTF-8"?>
<property name="logging.maxHistory" value="7"/>
<!-- spring boot使用日志需要引入这个 -->
<!--<include resource="org/springframework/boot/logging/logback/defaults.xml"/>-->
<include resource="org/springframework/boot/logging/logback/base.xml"/>
<property name="consoleLayoutPattern" value="%d{yyyy-MM-dd HH:mm:ss,SSS} %5p [%t] %replace(%caller{1}){'\t|Caller.{1}0|\r\n', ''} - %m%n" />
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<layout name="StandardFormat" class="ch.qos.logback.classic.PatternLayout">
<pattern>${consoleLayoutPattern}</pattern>
</layout>
</appender>
<root level="INFO">
<appender-ref ref="CONSOLE" />
</root>
<!--<!– INFO –>
<appender name="infoAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!– 文件路径 ,注意LOG_PATH是默认值,
它的配置对应application.properties里的logging.path值–>
<file>${LOG_PATH}/cloud-user.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!– 文件名称 –>
<fileNamePattern>${LOG_PATH}/cloud-user-%d{yyyy-MM-dd}.log
</fileNamePattern>
<!– 文件最大保存历史数量 –>
<MaxHistory>${logging.maxHistory}</MaxHistory>
</rollingPolicy>
<!– –>
<!– ${FILE_LOG_PATTERN}–>
<!– UTF-8–>
<!– –>
%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level [%thread] %logger{80} [%line] - %msg%n
utf8
<!–<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">
<Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%tid] [%thread] %-5level %logger{60} -%msg%n</Pattern>
</layout>
<charset>utf-8</charset>
</encoder>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>debug</level>
</filter>
</appender>–>
<root level="INFO">
<appender-ref ref="infoAppender"/>
<!– –>
<logger name="com.vcloud.user" additivity="false">
<level value="INFO" />
<appender-ref ref="infoAppender" />
<!–<appender-ref ref="CONSOLE" />–>
</logger>-->