3 回答
TA贡献1856条经验 获得超5个赞
springboot mybatis 整合后怎么答应输出sql语句
# Output pattern : date [thread] priority category - message
log4j.rootLogger=WARN, Console, RollingFile
#Console
log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=%d [%t] %-5p [%c] - %m%n
#RollingFile
log4j.appender.RollingFile=org.apache.log4j.DailyRollingFileAppender
log4j.appender.RollingFile.File=../logs/fgw.log
log4j.appender.RollingFile.layout=org.apache.log4j.PatternLayout
log4j.appender.RollingFile.layout.ConversionPattern=%d [%t] %-5p [%c] - %m%n
#Project defalult level
log4j.logger.dl=DUBUG
log4j.logger.org.springframework=WARN
log4j.logger.org.mybatis=DUBUG
这样就行了。
添加回答
举报