Enable CA Service Catalog's TRACE (or DEBUG) level for diagnostic purposes
search cancel

Enable CA Service Catalog's TRACE (or DEBUG) level for diagnostic purposes

book

Article ID: 12894

calendar_today

Updated On:

Products

CA Service Catalog

Issue/Introduction

The following instructions describe how to enable debug logging in Catalog, as written to the view.log file.

Environment

CA Service Catalog, 17.3 version.

Resolution

For Catalog 17.3

Backup the file log4j.xml, located in under %USM_HOME%\view\conf\, to a separate directory.

Edit the file log4j.xml, located in under %USM_HOME%\view\conf\, with a text editor.

  • Locate this line (around line 78)
    <Logger name="com.ca" level="info">

    Modify this line to read as:
    <Logger name="com.ca" level="DEBUG">
  • Toward the bottom of the log4j.xml file, locate this line:
    <Root level="warn">

    Modify this line to read as:
    <Root level="DEBUG">

The change takes  effect immediately. There is no need to recycle the CA Service Catalog service. 

 

NOTE:  Please use TRACE if you are looking to obtain performance statistics on SQL commands.

Edit the file log4j.xml, located in under %USM_HOME%\view\conf\, with a text editor.

  • Locate this line (around line 78)
    <Logger name="com.ca" level="info">

    Modify this line to read as:
    <Logger name="com.ca" level="TRACE">
  • Toward the bottom of the log4j.xml file, locate this line:
    <Root level="warn">

    Modify this line to read as:
    <Root level="TRACE">

The change takes  effect immediately. There is no need to recycle the CA Service Catalog service. 

 

For older releases of Catalog (prior to 17.3)

To turn on the TRACE ( or DEBUG )  logging level for CA Service Catalog
1) Go to the Catalog server,  locate a file called log4j.xml  under %USM_HOME%\view\conf\

2) Make a backup copy of log4j.xml. 

3) Modify log4j.xml :

3a)  Change:

<appender name="view" class="org.apache.log4j.RollingFileAppender">

    <param name="File" value="${usm.home}/logs/view.log" />

    <param name="MaxFileSize" value="20MB" />

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

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

    <layout class="org.apache.log4j.PatternLayout">

    <param name="ConversionPattern" value="%d{yyyy/MM/dd HH.mm.ss.SSS} %-5p [%t] [%c{1}] %m%n" />

    </layout>

  </appender>

   to :

<appender name="view" class="org.apache.log4j.RollingFileAppender">

    <param name="File" value="${usm.home}/logs/view.log" />

    <param name="MaxFileSize" value="20MB" />

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

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

    <layout class="org.apache.log4j.PatternLayout">

      <param name="ConversionPattern" value="%d{yyyy/MM/dd HH.mm.ss.SSS} %-5p [%t] [%c{1}] %m%n" />

    </layout>

  </appender>

 

3b)  Change:

      <logger name="com.ca">

        <level value="INFO" />

     </logger>

To :

    <logger name="com.ca">

      <level value="TRACE" />

    </logger>

3c)  Save this modified log4.xml .  The Service Catalog TRACE level  logging is  now on.

The change takes  effect immediately. There is no need to recycle the CA Service Catalog service. 

Reversing the Logging

To undo the tracing, simply restore the previously taken copy of the file taken at Step 2, or restore the log4j.xml file from the backup.
Save the TRACE level log settings first to another file, in case they are needed in the future.

 
NOTE: Do NOT leave the logging running unless it is required to troubleshoot a specific issue.

Additional Information

TRACE mode and DEBUG mode are two different methods to enable extended logging.  TRACE mode is not a subset of DEBUG; setting the logging to DEBUG will not display TRACE messages and vice versa