Spring Boot 日志配置模板
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="60 seconds" debug="false">
<!--
配置参考 - https://logback.qos.ch/manual/appenders.html
配置参考 - https://logback.qos.ch/manual/appenders.html#SizeAndTimeBasedRollingPolicy
-->
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" />
<conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" />
<conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" />
<!-- 日志上下文名称 -->
<contextName>my_logback</contextName>
<!-- <include resource="org/springframework/boot/logging/logback/base.xml" /> -->
<!-- <include resource="org/springframework/boot/logging/logback/defaults.xml"/> -->
<!--加载 Spring 配置文件信息 : applicationName -->
<springProperty scope="context" name="appName" source="spring.application.name" defaultValue="localhost"/>
<!--<property resource="logback.properties"/>-->