<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN" monitorInterval="30">
<Properties>
<Property name="AppName">uc</Property>
<Property name="HostName">docker-20</Property>
<Property name="SqlLogFile">log/sql.log</Property>
</Properties>
<Appenders>
<RollingFile name="SqlLogFileAppender" fileName="${SqlLogFile}"
filePattern="${SqlLogFile}-%d{yyyy-MM-dd}-%i.log">
<PatternLayout
pattern="time=%d{yyyy-MM-dd}T%d{HH:mm:ss.SSS+0800}`appName=${AppName}`hostName=${HostName}`logLevel=%-5p`%m%n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="500MB"/>
</Policies>
<DefaultRolloverStrategy max="100"/>
</RollingFile>
</Appenders>
<Loggers>
<!-- 下面的logger需要修改为你的项目根路径,如com.xxx.uc -->
<Logger name="com.xxx.uc.mapper" level="debug" additivity="false">
<appender-ref ref="SqlLogFileAppender" />
</Logger>
<!--这个是自定义日志类型SQLTRACE-->
<logger name="SQLTRACE" level="info" additivity="false">
<appender-ref ref="SqlLogFileAppender"/>
</logger>
</Loggers>
</Configuration>
网友评论