Hi,
Could you please explain me, how can I append the current date to error.log file. Something like error-DD-MM-YYYY.log.
Thanks,
Phalgun
Solved! Go to Solution.
Views
Replies
Total Likes
check this:- How to enable log-rotation for the error.log
//
To reconfigure the error.log of CRX, simply edit the log4j.xml configuration file of the CRX webapp. This is located beneath the /WEB-INF folder of the deployed CRX webapp.
Please edit the section for the error appender and do the following:
Excerpt from log4j.xml
<appender name="error" class="org.apache.log4j.RollingFileAppender">
<param name="maxBackupIndex" value="5" />
<param name="File" value="crx-quickstart/logs/crx/error.log"/>
<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>
This change will take effect after a repository restart. For more information, please refer to [1].
[1]Log4jXmlFormat - Logging-log4j Wiki
~kautuk
check this:- How to enable log-rotation for the error.log
//
To reconfigure the error.log of CRX, simply edit the log4j.xml configuration file of the CRX webapp. This is located beneath the /WEB-INF folder of the deployed CRX webapp.
Please edit the section for the error appender and do the following:
Excerpt from log4j.xml
<appender name="error" class="org.apache.log4j.RollingFileAppender">
<param name="maxBackupIndex" value="5" />
<param name="File" value="crx-quickstart/logs/crx/error.log"/>
<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>
This change will take effect after a repository restart. For more information, please refer to [1].
[1]Log4jXmlFormat - Logging-log4j Wiki
~kautuk