log4j.logger.com.yourpackage.littlepackage= DEBUG, test # Output to the File info log4j.appender.test=org.apache.log4j.DailyRollingFileAppender log4j.appender.test.DatePattern='_'yyyy-MM-dd'.log' log4j.appender.test.File=${catalina.home}/userActionLog/AActionRecord.log log4j.appender.test.layout=org.apache.log4j.PatternLayout log4j.appender.test.layout.ConversionPattern=%n%-d{yyyy-MM-dd HH:mm:ss}| %m%n