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 userapp-log4j2.xml configuration file, located in the \conf directory for the Tomcat server configuration (for example, /opt/netiq/idm/apps/tomcat/conf), and add the following rolling file appenders at the end of the file:

<appenders>

        <RollingFile name="IDAPPS" fileName="${sys:catalina.base}/logs/idapps.out" filePattern="${sys:catalina.base}/logs/idapps.out-%d{yyyy-MM-dd}.log">

                . . .

        </RollingFile>

        <RollingFile name="CLUSTER" fileName="${sys:catalina.base}/logs/cluster.out" filePattern="${sys:catalina.base}/logs/cluster.out-%d{yyyy-MM-dd}.log">

            <PatternLayout>

                <Pattern>%d %p %c{1.} [%t] %m%n</Pattern>

            </PatternLayout>

            <Policies>

                    <TimeBasedTriggeringPolicy interval="1" modulate="true"/>

                <SizeBasedTriggeringPolicy size="100 MB" />

            </Policies>

        </RollingFile>

 

    </appenders>

<Loggers>

     <Logger name="org.jgroups" level="DEBUG" additivity="false">
           <AppenderRef ref="CLUSTER"/>

     </Logger>

</Loggers>

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.