Increase logging levels, file size and rollover for PAM logs
search cancel

Increase logging levels, file size and rollover for PAM logs

book

Article ID: 9347

calendar_today

Updated On:

Products

CA Service Management - Service Desk Manager CA Process Automation Base Process Automation Manager

Issue/Introduction

This document will outline the steps to modify the logging levels, the file size of those logs for rollover and the number of total logs retained by Process Automation for purposes of tracing

To assist Broadcom Support in troubleshooting issues, logging levels often need to be increased in order to capture the full output of the problem. ERROR level logs (which is what you will normally see) do not necessarily mean that there was a problem. This is usually just normal output of activity.

And because Process Automation uses the embedded JBoss application server, it relies on Apache Log4j for the logging mechanism, and it does not utilize exception logging. 

Environment

Process Automation - All Versions

This document describes the extended logging approaches for both PAM 4.3 and 4.4. 

Please review the appropriate section based on your product.  The log file of interest in all versions will be the c2o.log.

Resolution

SETUP ORCHESTATOR LOGGING:  4.3 to 4.3.5 CP05 and prior versions

Make sure to monitor disk space on the drive where Process Automation is installed, and make sure to clean up and delete unnecessary log files on a regular basis. The /log/ folder itself can be deleted (when the orchestrator is stopped) and the folder will be recreated when the orchestrator is restarted.

If you make a copy of the following file, this copy must be moved to a backup location outside of the /PAM/ folder structure.

To enable INFO level logging, open the log4j.xml file located in the /PAM/server/c2o/conf folder with a text editor.

Search for JXTA and in that section where JXTA appears as shown here:

   <!-- A size based file rolling appender for C2O and JXTA Logs-->
   <appender name="C2OFILE" class="org.jboss.logging.appender.RollingFileAppender">
   <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
   <param name="File" value="${jboss.server.home.dir}/log/c2o.log"/>
   <param name="Threshold" value="WARN"/>
   <param name="Append" value="true"/>
   <param name="MaxFileSize" value="50000KB"/>
   <param name="MaxBackupIndex" value="3"/>

Change 

<param name="Threshold" value="WARN"/>

to

<param name="Threshold" value="INFO"/>

If the need is to use DEBUG logging (only under Support direction) the line should read as:

<param name="Threshold" value="DEBUG"/>

Next, search for "root" - no quotes. In the section that appears for root shown below:

   <!-- ======================= -->
   <!-- Setup the Root category -->  
   <!-- ======================= -->

   <root>
<priority value="WARN" />
        <appender-ref ref="CONSOLE"/>  
        <appender-ref ref="C2OFILE"/>    
        </root>

Change

<priority value="WARN" />

to

<priority value="INFO" />

If the need is to use DEBUG logging (only under Support direction) the line should read as:

<priority value="DEBUG" />

You do not need to restart PAM for this to take effect, it is a dynamic change. Support may request you clear the log files to get fresh results which will require a restart.

Changing the number of log files

In the JXTA section, you may also specify the number of log files that you wish to retain (currently the default is 3) as well as the size of each of the files (currently defaulted to 50000KB or 50MB).

To increase the number of retained files, change the MaxBackupIndex value from 3 to your desired count. If you wish to retain 10 log files, the line would be changed to

<param name="MaxBackupIndex" value="10"/>

If you would like to change the size of the files to 100MB, the MaxFileSize value would be modified such as

<param name="MaxFileSize" value="100000KB"/>

Make sure to retain the formatting in all modifications that are made.

As with the log level modification, any changes to these values are dynamic and do not require a restart of Process Automation for them to take affect.

 

SETUP ORCHESTATOR LOGGING:  4.3.5 CP06 onwards, including 4.4

Make sure to monitor disk space on the drive where Process Automation is installed, and make sure to clean up and delete unnecessary log files on a regular basis. The /log/ folder itself can be deleted (when the orchestrator is stopped) and the folder will be recreated when the orchestrator is restarted.

If you make a copy of the following file, this copy must be moved to a backup location outside of the /PAM/ folder structure.

To enable INFO level logging, open the log4j2.xml file located in the C:\Program Files\CA\PAM\wildfly\standalone\conf folder with a text editor.

Search for "root" - no quotes. In the section that appears for root shown below:
 
    <Root level="error">
        <AppenderRef ref="C2OFILE" />
        <AppenderRef ref="CONSOLE" />
    </Root>
 
Change to read as:
 
    <Root level="INFO">
        <AppenderRef ref="C2OFILE" />
        <AppenderRef ref="CONSOLE" />
    </Root>
 
 
 
If the need is to use DEBUG logging (only under Support direction) the above should read as:
   <Root level="DEBUG">
        <AppenderRef ref="C2OFILE" />
        <AppenderRef ref="CONSOLE" />
    </Root>
 
You do not need to restart PAM for this to take effect, it is a dynamic change. Support may request you clear the log files to get fresh results which will require a restart.
 
 
Changing the number of log files and log file size
 
Locate the section that reads as <!-- Rolling File Appender --> and modify the settings for DefaultRolloverStrategy and SizeBasedTriggeringPolicy.
 
DefaultRolloverStrategy is set to 3 by default.  This is the number of log files retained. 
SizeBasedTriggeringPolicy is set to 50000 KB.  This is the size of each log file.
 
Original value:
    <!-- Rolling File Appender -->
    <RollingFile name="C2OFILE">
      <FileName>${sys:jboss.server.log.dir}/c2o.log</FileName>
      <FilePattern>${sys:jboss.server.log.dir}/c2o.log.%i</FilePattern>
      <PatternLayout>
        <Pattern>%d %-5p [%c] [%15.15t] %m%n</Pattern>
      </PatternLayout>
      <Policies>
        <SizeBasedTriggeringPolicy size="50000 KB" />
      </Policies>
      <DefaultRolloverStrategy max="3" />
    </RollingFile>
 
 
Revised value:  DefaultRolloverStrategy changed to 10 and SizeBasedTriggeringPolicy set to 100000 KB in this example.
    <!-- Rolling File Appender -->
    <RollingFile name="C2OFILE">
      <FileName>${sys:jboss.server.log.dir}/c2o.log</FileName>
      <FilePattern>${sys:jboss.server.log.dir}/c2o.log.%i</FilePattern>
      <PatternLayout>
        <Pattern>%d %-5p [%c] [%15.15t] %m%n</Pattern>
      </PatternLayout>
      <Policies>
      <SizeBasedTriggeringPolicy size="100000 KB" />
      </Policies>
    <DefaultRolloverStrategy max="10" />
  </RollingFile>
 

Additional Information

One can also add logging to record the SOAP calls that are being sent through PAM:

  1. Navigate to $CAPAMROOT\server\c2o\.config\ directory in the CA PAM server.

  2. Create a backup copy of the OasisConfig.properties file and name it as OasisConfig.properties.bak or similar.

  3. Edit the original OasisConfig.properties file in a text editor.

  4. Add the following lines at the end of the file:
    pam.log.soap.request=true
  5. Save the OasisConfig.properties file