Hi,
I have implemented size based log rotation for error.log. The error.log rotates when size is 10MB. The client has asked for 100 previous rotations to be maintained. The issue is that while the log rotation occurs when file size is 10MB but only previous 21 versions are maintained.
Has anybody faced this issue? Any hints on what could be wrong?
Regards,
Anil
Solved! Go to Solution.
Views
Replies
Total Likes
Hi
Please refer to the article mentioned below :-
http://www.wemblog.com/2012/06/how-to-rotate-logs-in-cq-wem.html
//crx-quickstart/logs/crx/error.log
You can rotate CRX log through configuration in /crx-quickstart/server/runtime/0/_crx/WEB-INF/log4j.xml by changing configuration of
<appender name="error" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="crx-quickstart/logs/crx/error.log"/>
<param name="maxFileSize" value="10MB"/>
<param name="maxBackupIndex" value="20"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{dd.MM.yyyy HH:mm:ss} *%-5p* %c{1}: %m (%F, line %L)%n"/>
</layout>
</appender>
You can edit "maxFileSize" or "maxBackupIndex" as per you need.
I hope this would help you.
Thanks and Regards
Kautuk Sahni
Views
Replies
Total Likes
Hi
Please refer to the article mentioned below :-
http://www.wemblog.com/2012/06/how-to-rotate-logs-in-cq-wem.html
//crx-quickstart/logs/crx/error.log
You can rotate CRX log through configuration in /crx-quickstart/server/runtime/0/_crx/WEB-INF/log4j.xml by changing configuration of
<appender name="error" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="crx-quickstart/logs/crx/error.log"/>
<param name="maxFileSize" value="10MB"/>
<param name="maxBackupIndex" value="20"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{dd.MM.yyyy HH:mm:ss} *%-5p* %c{1}: %m (%F, line %L)%n"/>
</layout>
</appender>
You can edit "maxFileSize" or "maxBackupIndex" as per you need.
I hope this would help you.
Thanks and Regards
Kautuk Sahni
Views
Replies
Total Likes
If you go to 'ConfigMgr' and look at 'Apache Sling Logging Writer Configuration' there is a property 'Number of log files'. There you can configure the number of log files to be maintained.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies