-
1. Re: log4j configuration
pgier Feb 24, 2012 10:03 AM (in response to geethlochana)What product and version are you using?
-
2. Re: log4j configuration
chufaca Feb 28, 2012 2:12 PM (in response to geethlochana)I have the same question, for the Final version of AS 7 (worked fine in the RC), the configuration for MaxFileSize and MaxBackupIndex inside the log4j.xml file under DailyRollingFileAppender class is not working fine.
This is the actul configuration:
<appender name="FILE" class="org.apache.log4j.DailyRollingFileAppender">
<param name="File" value="${jboss.server.log.dir}/myLog.log"/>
<param name="Append" value="false"/>
<param name="MaxFileSize" value="60000KB"/>
<param name="MaxBackupIndex" value="10"/>
<param name="Threshold" value="DEBUG"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p (%5t)[%c] %m%n"/>
</layout>
</appender>
This is the error I'm getting:
15:36:25,680 ERROR [stderr] (MSC service thread 1-2) log4j:WARN No such property [maxFileSize] in org.apache.log4j.DailyRollingFileAppender.
15:36:25,680 ERROR [stderr] (MSC service thread 1-2) log4j:WARN No such property [maxBackupIndex] in org.apache.log4j.DailyRollingFileAppender.
Any help will be useful!!!
-
3. Re: log4j configuration
jaikiran Apr 9, 2012 1:59 AM (in response to chufaca)Those 2 properties don't seem applicable for DailyRollingFileAppender which switches the files on a daily basis and not based of size. I guess you want to use org.apache.log4j.RollingFileAppender instead.