8.7 Configuring Logging in a Cluster

This section includes tips for configuring logging in a Tomcat cluster.

8.7.1 Tomcat Logging

You can configure Tomcat for logging in a cluster. To enable logging for clusters, you need to edit the tomcat-log4j.xml configuration file, located in the \conf directory for the Tomcat server configuration (for example, \server\IDM\conf), and uncomment the following section at the end of the file:

<!--  Clustering logging 
  --> 
- <!-- 
 Uncomment the following to redirect the org.jgroups and
      org.tomcat.ha categories to a cluster.log file.
   <appender name="CLUSTER" class="org.tomcat.logging.appender.RollingFileAppender">
     <errorHandler class="org.tomcat.logging.util.OnlyOnceErrorHandler"/>
     <param name="File" value="${tomcat.server.home.dir}/log cluster.log"/>
     <param name="Append" value="false"/>
     <param name="MaxFileSize" value="500KB"/>
     <param name="MaxBackupIndex" value="1"/>
     <layout class="org.apache.log4j.PatternLayout">
       <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
     </layout>
   </appender>
   <category name="org.jgroups">
     <priority value="DEBUG" />
     <appender-ref ref="CLUSTER"/>
   </category>
   <category name="org.tomcat.ha">
     <priority value="DEBUG" />
     <appender-ref ref="CLUSTER"/>
   </category>
  --> 

You can find the cluster.log file in the log directory for the Tomcat server configuration (for example, \server\IDM\log).

8.7.2 Identity Applications Logging

The logging configuration is not propagated to all servers in cluster. For example, if you use the Logging administration page on a server in a cluster to set the logging level for com.netiq.afw.portal.aggregation to Trace, this setting is not propagated to the other servers in the cluster. You must individually configure the level of logging messages for each server in the cluster.

For more information, see Configuring Logging Settings.