Forums Register Login

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

+Pie Number of slices to send: Send
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?
+Pie Number of slices to send: Send
Can you post your complete log4j.xml file ?
+Pie Number of slices to send: Send
With pleasure. It goes as following:



Talk sense to a fool and he calls you foolish. -Euripides A foolish tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 3200 times.
Similar Threads
how to disable the log
Unable to split log files
what is wrong with log4j configration
Log4j Grouping application logs
how to debug log4j
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 04:59:00.