时间:2021-07-01 10:21:17 帮助过:21人阅读
log4j.properties
--------------------------------------------------------------------
# 设置根路径打印级别为debug log4j.rootLogger=debug, Console # 定义appender 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 # 过滤掉不必要的日志(控制台打印出的多余日志的包路径) log4j.logger.org.apache=error log4j.logger.org.springframework=error log4j.logger.org.mybatis.spring=error log4j.logger.net.sf=error log4j.logger.com.alibaba.druid=error # 打印出sql语句相关日志 log4j.logger.java.sql.ResultSet=error log4j.logger.java.sql.Connection=error log4j.logger.java.sql.Statement=debug log4j.logger.java.sql.PreparedStatement=debug
Log4j打印纯sql日志
标签:ons att lib 定义 -name framework style -- ring