### set log levels ### log4j.rootLogger= INFO, Console, File, Error ### Console appender definition ### log4j.appender.Console=org.apache.log4j.ConsoleAppender log4j.appender.Console.Target=System.out log4j.appender.Console.layout=org.apache.log4j.PatternLayout log4j.appender.Console.layout.ConversionPattern=%d %p [%c] %m%n ###### File appender definition ####### log4j.appender.File = org.apache.log4j.DailyRollingFileAppender log4j.appender.File.File = ${catalina.home}/logs/projectName/log.log log4j.appender.File.Append = true log4j.appender.File.Threshold = INFO log4j.appender.File.layout = org.apache.log4j.PatternLayout log4j.appender.File.layout.ConversionPattern=%d %p [%c] %m%n ###### Error appender definition ####### log4j.appender.Error = org.apache.log4j.DailyRollingFileAppender log4j.appender.Error.File = ${catalina.home}/logs/projectName/error.log log4j.appender.Error.Append = true log4j.appender.Error.Threshold = ERROR log4j.appender.Error.layout = org.apache.log4j.PatternLayout log4j.appender.Error.layout.ConversionPattern = %d %p [%c] %m%n
时间: 2024-10-14 08:17:27