How do I change the log roll size for Smarts Network Configuration Manager (Smarts NCM)?
How do I change the number of backup log files created by Smarts NCM?
Is log rolling in Smarts NCM based on the size of the log file or the age of the file?
Log rolling in Smarts NCM is based on the size of the log file and not the age of the file. To change the size at which a log file rolls in Smarts NCM, you need to modify the "Appender" for that log file in the
log4j.xml file on the Smarts NCM Application server. This is done as follows:
- On the Smarts NCM Application server, navigate the the following location:
$VOYENCE_HOME$/jboss/server/vc-server/conf/
- Open the log4j.xml file in an appropriate XML editor.
- Look for the Appender for the log file you want to adjust. The following is an example of the powerup.log Appender:
<!-- =========================== -->
<!-- Appender for a rolling file -->
<!--(by size) named powerup.log. -->
<!-- =========================== -->
<appender name="POWERUP" class="org.jboss.logging.appender.RollingFileAppender">
<param name="File" value="${jboss.server.home.dir}/log/powerup.log"/>
<param name="Append" value="true"/>
<param name="MaxFileSize" value="200MB"/>
<param name="MaxBackupIndex" value="5"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p [%c] (%t) %m%n"/>
</layout>
</appender>
- To change the size of the log file, adjust the MaxFileSize value to the value you want. To change the number of backup log files created, change the MaxBackupIndex value to the value you want.
- Save and close the log4j.xml file.
- Restart the NCM Application server.