Logging and Troubleshooting


Revised: May 27, 2013, OL-29109-01

Introduction

This chapter describes the Cisco SCA BB Service Configuration API logging functionality. API logging allows you to monitor the operations the API client calls.

API logging also allows you to troubleshoot the Service Configuration API integration.

Service Configuration API Client Logging

The Service Configuration API uses the Apache Jakarta log4j package for logging. The log4J enables SCE to log every activated operation in to the apilog file located in the ${user.home} directory.

Logging parameters are configured using the log4J properties files. To enable logging, make sure that this file is in the application CLASSPATH. The file is read at startup of the application. If you modify the properties file, you must restart the application.

The following example is the installed content of the log4j.properties file:

# default Log4j configuration for Service Configuration API 
log4j.rootCategory=INFO, apiStdout 
# In order to enable the logging to the file Replace the above  
# line with the following:  
# log4j.rootCategory=INFO, files 
# stdout is set to be a ConsoleAppender.  
log4j.appender.apiStdout=org.apache.log4j.ConsoleAppender 
log4j.appender.apiStdout.layout=org.apache.log4j.PatternLayout 
log4j.appender.apiStdout.layout.ConversionPattern=+ %d{dd-MMM HH:mm:ss.SSS} [%t] %-5p 
%c%n%m%n 
# files is set to be a RollingFileAppender.  
#log4j.appender.files=org.apache.log4j.RollingFileAppender 
#log4j.appender.files.layout=org.apache.log4j.PatternLayout 
#log4j.appender.files.layout.ConversionPattern=+ %d{dd-MMM yyyy HH:mm:ss.SSS} [%t] %-5p %c 
%x\n%m\n 
#log4j.appender.files.File=${user.home}/apilog 
#log4j.appender.files.Threshold=INFO 
#log4j.appender.files.ImmediateFlush=true 
#log4j.appender.files.MaxFileSize=1MB 
#log4j.appender.files.MaxBackupIndex=4 
# In order to enable debug logging uncomment the following two lines 
#log4j.category.com.cisco=DEBUG 
#log4j.category.com.pcube=DEBUG
 
   

To enable debug logging, uncomment the last two lines in the file. By default, logging is sent to the standard output.

To direct the logging to a file, uncomment the line:

# log4j.rootCategory=INFO, files