12345678_0001
# Output pattern : date [thread] priority category - messagelog4j.rootLogger=WARN, Console, RollingFile#Consolelog4j.appender.Console=org.apache.log4j.ConsoleAppenderlog4j.appender.Console.layout=org.apache.log4j.PatternLayoutlog4j.appender.Console.layout.ConversionPattern=%d [%t] %-5p [%c] - %m%n#RollingFilelog4j.appender.RollingFile=org.apache.log4j.DailyRollingFileAppenderlog4j.appender.RollingFile.File=../logs/fgw.loglog4j.appender.RollingFile.layout=org.apache.log4j.PatternLayoutlog4j.appender.RollingFile.layout.ConversionPattern=%d [%t] %-5p [%c] - %m%n#Project defalult levellog4j.logger.dl=DUBUGlog4j.logger.org.springframework=WARNlog4j.logger.org.mybatis=DUBUG这样就行了。