This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Log4j doesn't split the log files as it supposed to

 
Guy Roth
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using the following appender as the properties file to configure log4j:

<appender name="errorAppender" class="org.apache.log4j.RollingFileAppender">
<param name="Threshold" value="ERROR" />
<param name="File" value="C:/Data/logs/error.log" />
<param name="MaxFileSize" value="5MB" />
<param name="MaxBackupIndex" value="3" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %c{1} %-4r %-5p %x - %m%n" />
</layout>
</appender>

Even though, the file that it creates got so far to the monster size of 12MB although as far as I understand log4j should have stop when the file reached 5MB and start another file.
What do I do wrong?
 
Chinna Eranna
Ranch Hand
Posts: 174
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post your complete log4j.xml file ?
 
Guy Roth
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With pleasure. It goes as following:



 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic