aspose file tools*
The moose likes Other Open Source Projects and the fly likes Log4j doesn't split the log files as it supposed to Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Log4j doesn Watch "Log4j doesn New topic
Author

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

Guy Roth
Ranch Hand

Joined: Aug 09, 2009
Posts: 74
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

Joined: Dec 08, 2009
Posts: 174

Can you post your complete log4j.xml file ?


- Chinna
Guy Roth
Ranch Hand

Joined: Aug 09, 2009
Posts: 74
With pleasure. It goes as following:



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