Question
Log Rotation with DailySizeRollingFileAppenderPega
Hello,
I am working on rotating my log files from within Pega based on Time and Size with the DailySizeRollingFileAppender in Pega 7.1.9. The application is running on JBoss EAP 6.4.4 on RHEL 6.
The time based portion of the appender seems to be working fine, but I am trying to also rotate based on the 'MaxFileSize' parameter. I lowered the value to 250KB for testing, but the log file is still being written to after the log size is met. Am I misinterpreting how the appender should work? or is something wrong with the syntax below? the $pega.log.location is a variable that I am passing via JAVA_OPTIONS
<appender name="test_file" class="com.pega.pegarules.priv.util.DailySizeRollingFileAppenderPega">
<param name="FileNamePattern" value="'${pega.log.location}/test_file-'yyyy-MM-dd-a'.log'"/>
<param name="MaxFileSize" value="50MB" />
<layout class="com.pega.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d [%t] %-5p %c- %m%n"/>
</layout>
</appender>
Thanks,
Jeff
first check if without substitution, does the appender work (use hard-coded path)? I don't believe you can simply pass in an jvm argument for that. I see the default (web.tmpdir) substitution had to be set in the java code.