This documentation supports the 9.1 to 9.1 Service Pack 3 version and its patches of BMC Atrium Core. The documentation for version 9.1.04 and its patches is available here.

To view the latest version, select the version from the Product version menu.

Java API logging

The BMC Atrium CMDB Java API processing can be logged by setting parameters in the log4j_cmdbapi.xml file, which helps you to debug your Java API program. When you enable logging, the BMC Atrium CMDB records details about the Java calls you make in your program, including the list of the calls, the input arguments, and the return values for each call.

To enable logging

  1. Copy the log4j_cmdbapi.xml file from the cmdb\sdk\bin subdirectory of your installation directory and paste it to a location on your local drive.
  2. After you copy the log file to the new location, add the directory path to the Java class path.
    For example:

    CLASSPATH-%CLASSPATH%;C:/AtriumCore/cmdb/sdk64/bin

    Note

    The log file is generated in the directory where the program is executed.



    The BMC Atrium CMDB Java API classifies the messages into error, warning, information, and debug categories. The logging levels are inclusive of their preceding levels. For example, if you set the debug level to 3, you receive log messages for levels 1, 2, and 3.
  • 1: Fatal — Logs messages for severe errors that cause premature termination.
  • 2: Error — Logs messages for other runtime errors or unexpected conditions.
  • 3: Warning — Logs messages for incorrect usage of the API calls. The runtime issues that are logged might be incorrect but not wrong. This is the default logging level.
  • 4: Information — Logs informational messages, such as the list of Java calls made by the client.
  • 5: Debug — Logs details for the calls, such as the list of arguments and the return values for each call.
  • 6: Trace — Logs finer level of details for debugging errors.

Each entry in the log provides the following details:

  • Timestamp — The date and time of the log entry.
  • Log Type — The type of log entry: fatal, warning, error, information, or debug.
  • Message — The message for the log entry.

To change the logging level for Java API, set the value element with the appropriate setting for the com.bmc.cmdb.api logging component. For more information about BMC Atrium CMDB Java logging, see http://logging.apache.org/log4j/1.2.

Was this page helpful? Yes No Submitting... Thank you

Comments