<conversionRule conversionWord=“wEx”
converterClass=“org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter” />
${CONSOLE_LOG_PATTERN}
${LOG_HOME}/Slf4j_%d{yyyy-MM-dd}.log
30
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
10MB
结果展示:
logback-spring
debug
${CONSOLE_LOG_PATTERN}
UTF-8
${logging.path}/web_debug.log
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
UTF-8
${logging.path}/web-debug-%d{yyyy-MM-dd}.%i.log
100MB
15
debug
ACCEPT
DENY
${logging.path}/web_info.log
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
UTF-8
${logging.path}/web-info-%d{yyyy-MM-dd}.%i.log
100MB
15
info
ACCEPT
DENY
${logging.path}/web_warn.log
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
UTF-8
${logging.path}/web-warn-%d{yyyy-MM-dd}.%i.log
100MB
15
warn
ACCEPT
DENY
${logging.path}/web_error.log
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
UTF-8
${logging.path}/web-error-%d{yyyy-MM-dd}.%i.log
100MB
15
ERROR
ACCEPT
DENY