Running logging for a specific user by using selected categories

To start logging for a specified user, implement dye tracing and customize the output by using selected categories and distributing output to one or more appender definitions.

Procedure

  1. In the c10_location\configuration directory, locate the ipf trace file for the component that you want to trace. The files are named ipfcomponentclientconfig.xml.sample. For example, ipfAAAclientconfig.xml.
  2. Create a copy of the identified ipfcomponentclientconfig.xml.sample file using the name ipfclientconfig.xml.off.
  3. Using a text editor, open the ipfclientconfig.xml.off file and make the following changes:
    • Add or change the log level of the <categories> you require.
    • Perform one of the following two actions:

      Add a new <appender> section below the last existing <appender> element, as follows:

      <appender name="DyeTraceOutput" class="org.apache.log4j.RollingFileAppender">
      		<param name="File" value="../logs/dyetrace_output.log"/>
      		<param name="MaxBackupIndex" value="1"/>
      		<param name="MaximumFileSize" value="10485760"/>
      		<layout class="org.apache.log4j.PatternLayout"/>
            <param name="ConversionPattern" value="%m%n"/>
         </layout>
         <filter class="com.cognos.indications.LogIPFDyeTraceFilter"/>
      </appender>

      or modify one of the existing appender definitions by adding the line

      <filter class="com.cognos.indications.LogIPFDyeTraceFilter"/>

      before closing the </appender> tag.

  4. For the <categories> sections that you want to apply the dye trace filter to, edit the <appender-ref> property to refer to the DyeTraceOutput appender or to the appender which had the filter added to it. For example:
    <category name="Audit.RTUsage.CAM.AAA" class="com.cognos.indications.
    LogTypedLogger" additivity="false">
       <level value="debug"/>
       <appender-ref ref="DyeTraceOutput"/>
    </category>
  5. Save the ipfclientconfig.xml.off file.
  6. To activate this file, rename it toipfclientconfig.xml
  7. You can disable user-specific logging and resume normal logging by renaming the ipfclientconfig.xml file back to ipfclientconfig.xml.off. Reset the users you applied DyeTracing to after restarting the product.

Results

Within 60 seconds, user-specific logging is automatically activated and output is generated. For the appender described here, the output is stored in the c10_location\logs\dyetrace_output.log file. For other appenders, it will be the destination configured for that appender. When an authenticated session is established with IBM® Cognos®, only actions by the specified user are logged.

You might receive some indications that are not related to the specified user. For example, this might occur when you start the product or when indications are logged before the user's authentication is complete. You can change the log level of categories to avoid an overwhelming number of indications.