网上的
# Global logging configuration
log4j.rootLogger=ERROR, stdout
# log4j.logger后面跟着的是项目dao包路径,里面全部都是dao层的接口
log4j.logger.com.kickstarter.dao=TRACE
# Console output...
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] - %m%n
我的生效版本
# Global logging configuration
log4j.rootLogger=error,info,debug,stdout
# log4j.logger后面跟着的是项目dao包路径,里面全部都是dao层的接口
# log4j.logger.com.kickstarter.dao=TRACE
# Console output...
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] - %m%n