我习惯的log4j配置

log4j.rootLogger=debug,outLocation

log4j.appender.outLocation=org.apache.log4j.ConsoleAppender
log4j.appender.outLocation.layout=org.apache.log4j.PatternLayout
log4j.appender.outLocation.layout.ConversionPattern=[%-5p] [%d{yyyy/MM/dd HH\:mm\:ss}] [%-20l]  %m%n

你可能感兴趣的:(log4j)