Smarts NCM: How do I change the log roll size (point at which a log file rolls) or the number of backup log files created? Does a Smarts NCM log roll based on file size or file age?
search cancel

Smarts NCM: How do I change the log roll size (point at which a log file rolls) or the number of backup log files created? Does a Smarts NCM log roll based on file size or file age?

book

Article ID: 331169

calendar_today

Updated On:

Products

VMware Smart Assurance

Environment

VMware Smart Assurance - NCM

Resolution

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:
  1. On the Smarts NCM Application server, navigate the the following location:

    $VOYENCE_HOME$/jboss/server/vc-server/conf/

     
  2. Open the log4j.xml file in an appropriate XML editor.
  3. 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>

     
  4. 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.
  5. Save and close the log4j.xml file.
  6. Restart the NCM Application server.