How to enable logging on web services within Service Desk

Document ID : KB000021473
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

It may be necessary to enable logging on web services to troubleshoot issues with web services interaction with Service Desk

Solution:

  1. Locate the file 'NX_ROOT\bopcfg\www\CATALINA_BASE\webapps\CAisd\WEB-INF\log4j.properties' and open with a text editor.

    Locate the following line
    log4j.rootCategory=info, jsrvrlog
    and change TO
    log4j.rootCategory=debug, jsrvrlog

  2. Create the file 'NX_ROOT\bopcfg\www\CATALINA_BASE\webapps\axis\WEB-INF\classes\log4j.properties' and paste the text below into it (everything between the two lines of bold asterisks). Note the path C:/PROGRA~1/CA/SERVIC~1/log/jsrvrbop.log in the text file. Please change it to path prudent for your ServiceDesk install. You must use a short name path equivalent - long name paths with spaces will not work.

    **************************************************************************
    #----------------------------------------------------------------------
    # $Id: log4j.properties.tpl,v 1.5 2005/11/01 23:35:08 kubtr01 Exp $
    # Created: 03/12/04
    #----------------------------------------------------------------------
    # Description:
    # Unicenter ServicePlus log4j configuration
    #
    # Default output is a set of ten files in $NX_ROOT/log/jsrvr.log
    # Messages of level error and above are also echoed to the console

    log4j.rootCategory=debug, axislog

    log4j.appender.axislog=org.apache.log4j.RollingFileAppender
    log4j.appender.axislog.File=C:/PROGRA~1/CA/SERVIC~1/log/axis.log
    log4j.appender.axislog.MaxBackupIndex=9
    log4j.appender.axislog.MaxFileSize=30MB
    log4j.appender.axislog.layout=org.apache.log4j.PatternLayout
    log4j.appender.axislog.layout.ConversionPattern=%d{MM/dd
    HH:mm:ss.SSS}[%t] %-5p %c{1} %L %m %n
    log4j.appender.stdout=org.apache.log4j.ConsoleAppender
    log4j.appender.stdout.Threshold=error
    log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
    log4j.appender.stdout.layout.ConversionPattern=[%t] %-5p %c{1} %L %m %n
    !log4j.appender.stdout.layout.ConversionPattern=%d{MM/dd hh:mm:ss.SSS}
    %t%- 5p %F %L %m %n

    # Default bop_logging output from Java applications is a set of three
    files
    # written to $NX_ROOT/log/jsrvrbop.log
    # Bop_logging is only produced if the loglevel is set to debug.

    log4j.logger.bop_logging=info, jsrvrboplog
    log4j.appender.jsrvrboplog=org.apache.log4j.RollingFileAppender
    log4j.appender.jsrvrboplog.File=C:/PROGRA~1/CA/SERVIC~1/log/jsrvrbop.log
    log4j.appender.jsrvrboplog.MaxBackupIndex=30
    log4j.appender.jsrvrboplog.MaxFileSize=30MB
    log4j.appender.jsrvrboplog.layout=org.apache.log4j.PatternLayout
    log4j.appender.jsrvrboplog.layout.ConversionPattern=%m %n

    # Default log level for pdm_rpc package
    log4j.logger.com.ca.ServicePlus.pdm_rpc=DEBUG
    log4j.logger.usdjws65=DEBUG
    ***************************************************************************

  3. Recycle the Tomcat process by running the following commands:

    pdm_tomcat_nxd -c stop
    pdm_tomcat_nxd -c start

  4. Once Tomcat has been recycled, check for the creation of the axis.log and jsrvrbop.log files in the NX_ROOT\log directory.