Running logging for a specific user by using selected categories

You can start logging for a specified user, implement dye tracing, and customize 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 you want to trace. The files are named ipf<component>clientconfig.xml.sample. For example, ipfAAAclientconfig.xml.
  2. Create a copy of the identified ipf<component>clientconfig.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 loglevel of the <categories> you require.
    • 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 the closing </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 to ipfclientconfig.xml.
  7. You can disable user-specific logging and resume normal logging by renaming the ipfclientconfig.xml file back to ipfcliencofig.xml.off. Reset the users you applied DyeTracing to after restarting the product.

Results

Within 60 seconds, user-specific logging automatically activates and output is generated. For the appender described here, the output is stored in c10_location\logs\dyetrace_output.log. 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.

Note: 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.
Tip: You can change the log level of categories to avoid an overwhelming number of indications.