log4j.logger.otherlog=INFO, otherlog log4j.appender.otherlog=org.apache.log4j.DailyRollingFileAppender log4j.appender.otherlog.Append=true log4j.appender.otherlog.DatePattern='.'yyyy-MM-dd log4j.appender.otherlog.File=D:/log/otherlog/log.log log4j.appender.otherlog.Threshold=INFO log4j.appender.otherlog.layout=org.apache.log4j.PatternLayout log4j.appender.otherlog.layout.ConversionPattern=%d{yyy-MM-dd HH:mm:ss } [%p] [%l] : %m%n log4j.additivity.otherlog=false log4j.appender.otherlog.MaxBackupIndex=30 上述配置文件是什么意思
时间: 2023-10-09 14:06:15 浏览: 46
这是一个log4j的配置文件,用于配置日志输出的一些参数。其中,log4j.logger.otherlog=INFO表示将otherlog的日志级别设置为INFO;log4j.appender.otherlog=org.apache.log4j.DailyRollingFileAppender表示使用日志滚动文件输出器来输出日志;log4j.appender.otherlog.Append=true表示在日志文件中追加日志;log4j.appender.otherlog.DatePattern='.'yyyy-MM-dd表示日志文件的命名方式为以日期结尾,例如:log.2022-01-01;log4j.appender.otherlog.File=D:/log/otherlog/log.log表示日志输出到D:/log/otherlog/log.log文件中;log4j.appender.otherlog.Threshold=INFO表示日志级别低于INFO的日志将不会输出;log4j.appender.otherlog.layout=org.apache.log4j.PatternLayout表示使用PatternLayout日志布局;log4j.appender.otherlog.layout.ConversionPattern=%d{yyy-MM-dd HH:mm:ss } [%p] [%l] : %m%n表示日志输出格式为日期、日志级别、日志所在的类和方法、日志内容等;log4j.additivity.otherlog=false表示otherlog的日志不会再向上级logger传递;log4j.appender.otherlog.MaxBackupIndex=30表示保留日志文件的最大数量为30个。