# MyBatis log4j.properties 配置文件模板

log4j.properties

log4j.rootLogger=ERROR, stdout

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] - %m%n

# MyBatis Mapper
log4j.logger.cn.tedu.mapper=TRACE

参考资料:

MyBatis Log4j配置 (opens new window)