Does anyone have any ideas
"why does our log4j log file not roll and continue to grow huge in size?"
.. It seems that this happens only in one of our environments. Besides,
The log file just does not roll when the machine is under load!
We checked a few things, searched Google and Stack Oevrflow to no avail.
This is what we are studying now
"I read somewhere that some people see that rolling does not work if the application is running as a service, but it works fine if it is launched from the command line, we can check to make sure that this is not what we see (narrowing it again)? There were several people who saw this. "
Our configuration:
<appender name="file" class="org.apache.log4j.RollingFileAppender">
<param name="file" value="D:/myloglocation/subfolder/mylog.txt"/>
<param name="MaxFileSize" value="5MB"/>
<param name="MaxBackupIndex" value="50"/>
<param name="append" value="false"/>
<param name="bufferedIO" value="false"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%t] [%c{4}] %m%n"/>
</layout>
</appender>
Does anyone have any idea what might happen here?
PS: We are thinking of changing the bufferedIO flag above (for performance), but it cannot be connected correctly?
source
share