配置log4j2实现输出SQL语句
<?xml version="1.0" encoding="UTF-8"?>
<configuration status="OFF">
<appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:} [%t] %-5level %logger{36} - %msg%n"/>
</Console>
<!-- <File name="File" fileName="../logs/" append="true">
<PatternLayout pattern="%d{HH:mm:} %-5level %class{36} %L %M - %msg%xEx%n"/>
</File> -->
</appenders>
<loggers>
<root level="info">
<appender-ref ref="Console"/>
</root>
<logger name="" level="debug" additivity="false">
<appender-ref ref="Console"/>
</logger>
<!-- 是你的dao包的路径 -->
</loggers>
</configuration>