The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This chapter describes the Cisco SCA BB Service Configuration API logging functionality. API logging allows you to monitor the operations being called by the API client.
API logging also allows you to troubleshoot the Service Configuration API integration.
The Service Configuration API uses the Apache Jakarta log4j package for logging. This provides the ability to log every activated operation into 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 make any changes 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
as explained in the file.