cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Control the Size of notification-err.log

Control the Size of notification-err.log

Summary

This article provides the steps necessary to restrict the size of notification-err.log.

Synopsis

The log file notification-err.log will track various information about events and exceptions occurring on the notification server. This log can grow fairly rapidly. The longer that the the Notification server runs, the more that notification-err.log will continue to grow. This article provides the steps necessary to restrict the size of notification-err.log.

Discussion

By default, and if not deleted manually, notification-err.log will grow indefinitely until available disk space is exhausted. To control the size of this log file, it will be necessary to make a change to the file <InstallDir>\FNC1500\tomcat\webapps\ROOT\WEB-INF\classes\log4j-custom.xml. Note that the path may vary somewhat based on the version of Flexnet Connect, but there is only one instance of the file log4j-custom.xml.

First, create a backup of this file. Next, open this file in a text editor, and look for the following section:

<appender name="WARN_AND_ERROR" class="org.apache.log4j.FileAppender">
<param name="File" value="${ISUS_HOME_DIR}/notification-err.log"/>
<param name="Append" value="true"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d (%c) %n%m%n----------------%n"/>
</layout>
</appender>

The FileAppender type will not restrict the size of the log file. It will be necessary to change the appender type to a RollingFileAppender. This allows the setting of the maximum size of the log file, as well as setting the number of backups for older logs. To convert to a RollingFileAppender, change the above section to the following:

<appender name="WARN_AND_ERROR" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="${ISUS_HOME_DIR}/notification-err.log"/>
<param name="MaxFileSize" value="100000KB"/>
<param name="MaxBackupIndex" value="2"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d (%c) %n%m%n----------------%n"/>
</layout>
</appender>

This, of course, will limit the size of notification-err.log to 100000KB (approximately 100MB), and keep only a single backup copy.

Note that Flexnet Connect must be restarted before the changes take effect.
Labels (2)
Was this article helpful? Yes No
No ratings
Version history
Last update:
‎Jul 14, 2011 02:50 PM
Updated by: