log4j.debug=false ## 控制台输出 log4j.appender.stdoutAppender=org.apache.log4j.ConsoleAppender log4j.appender.stdoutAppender.layout=org.apache.log4j.PatternLayout log4j.appender.stdoutAppender.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{3} - %m%n ## The log level may be one of OFF, FATAL, ERROR, WARN, INFO, ## DEBUG, or ALL. The default level is defined as the first ## element in the list of values for the log4j.rootLogger ## property. ## # 指定package log4j.logger.z201.github.io.code.log.log4j = ALL , stdoutAppender
log4j.debug=false ## 控制台输出 log4j.appender.stdoutAppender=org.apache.log4j.ConsoleAppender log4j.appender.stdoutAppender.layout=org.apache.log4j.PatternLayout log4j.appender.stdoutAppender.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{3} - %m%n #info日志信息 log4j.logger.infoFile=INFO,infoFile log4j.appender.infoFile=org.apache.log4j.RollingFileAppender log4j.appender.infoFile.Append=true log4j.appender.infoFile.File=logs/infoFile.log log4j.appender.infoFile.encoding=UTF-8 log4j.appender.infoFile.maxBackupIndex=30 log4j.appender.infoFile.MaxFileSize=15MB log4j.appender.infoFile.Threshold=INFO log4j.appender.infoFile.FILE.DatePattern='.'yyyy-MM-dd-HH-mm'.log' log4j.appender.infoFile.layout=org.apache.log4j.PatternLayout log4j.appender.infoFile.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} [%5p] - %F(%L) - %m%n #error日志信息 log4j.logger.errorFile=ERROR,errorFile log4j.appender.errorFile=org.apache.log4j.RollingFileAppender log4j.appender.errorFile.Append=true log4j.appender.errorFile.File=logs/errorFile.log log4j.appender.errorFile.encoding=UTF-8 log4j.appender.errorFile.maxBackupIndex=30 log4j.appender.errorFile.MaxFileSize=15MB log4j.appender.errorFile.Threshold=ERROR log4j.appender.errorFile.FILE.DatePattern='.'yyyy-MM-dd'.log' log4j.appender.errorFile.layout=org.apache.log4j.PatternLayout log4j.appender.errorFile.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} [%5p] | %m%n ## The log level may be one of OFF, FATAL, ERROR, WARN, INFO, ## DEBUG, or ALL. The default level is defined as the first ## element in the list of values for the log4j.rootLogger ## property. ## # system logs log4j.logger.z201.github.io.code.log.log4j=ALL , infoFile , errorFile , stdoutAppender