When you encounter a problem, the API log file, dklog.log, can provide more information to help you investigate
the problem.
Setting the trace level in the API log to DEBUG trace
setting can greatly increase the speed with which you resolve the
problem. The dklog.log file is generated any
time IBM® Content Manager is used.
Almost every IBM Content Manager application
uses the APIs, such as the system administration client.
Requirement: Be sure that you are logged in
with, or change to, a user ID that has permission to change the cmblogconfig.properties file.
The cmblogconfig.properties file contains the following default
settings:
- It uses the default log manager.
- The default log file name is dklog.log.
- The dklog.log file is placed in the IBMCMROOT/log/connectors directory,
where IBMCMROOT is the installation path for IBM Content Manager.
- Logging priority is set to Error.
- The maximum number of exceptions of the same error message ID
to allow is 5.
You can find the location of the cmblogconfig.properties file by viewing the console information for the application. If
the properties file is found on the machine where the application
is installed and the ICMFORCECONSOLELOG environment variable is set
to true or TRUE, then
the path of the properties file is added to the console log after
the application starts. If the properties file is not found, then
a message stating that the file is not found is added to the console
log. A similar message is also added for the icmcmconfig.properties file. The path information for the icmcmconfig.properties file varies depending upon whether the application is a Java™ or C++ application. For a Java application, the console displays only
that the file is found because it does not resolve the part of the
path contained in the CLASSPATH environment variable. For a C++ application,
the entire path is displayed.
Performance tips
- When the trace setting of the API log is set higher than ERROR,
the overall performance is greatly reduced while the system is providing
extensive information to the log file. When debugging is complete,
reset the API log trace setting to the default level of ERROR or less.
- Delete old IBM Content Manager logs (dklog.log). When debugging, you can focus
on the current error and events just before it if you keep the API
log file size and content to a minimum. This step can help you to
avoid searching a large file and can increase the speed to resolution.
Modifying the API trace level
To modify
the API trace level, you need to edit the cmblogconfig.properties file.
Tip: You might need to modify only the log
priority settings and retain the default settings for the log file
output type, name, and location. This need depends upon your installation
configuration.
- Open the cmblogconfig.properties file that
is located in IBMCMROOT in
a text editor.
Tip: Make a backup of the cmblogconfig.properties file before you modify it.
- In section 0 (global settings), specify a maximum exception count.
The default value is 5.
- In section 1 (log manager factory setting), choose between using
the default log manager or log4j.
- In section 2.1 (specify log priority), choose a log priority.
Priorities range from DISABLE to DEBUG. The log priority parameter
is defined at the end of the section in a key-value pair. If you are
using the default logger, the default log priority setting is DKLogPriority=ERROR. If you are using the log4j logging
framework, the default log priority setting is DKAPIJavaLogLevel=ERROR. The priorities are:
- DISABLE
- Disables logging.
- FATAL
- Provides information that the program encountered unrecoverable
errors and must cease operating immediately. Stopping the program
is done separately, not from the logging facility.
- ERROR
- Provides information that the program encountered recoverable
or unrecoverable errors, but is able to continue operating.
- PERF
- Used to collect output information for measuring performance.
- INFO
- Provides significant event messages, such as successful logon.
- TRACE_NATIVE_API
- Used for logging before and after a native call. This setting
provides parameters and return data information.
- TRACE_ENTRY_EXIT
- Used for signaling entries and exits of program modules (or code
blocks).
- TRACE
- Used to output additional diagnostic information, such as program
state changes, function parameter information, and function return
value information.
- DEBUG
- Used to output information for debugging errors.
- In section 2.2 (log output destination setting), specify where
to log information. The log output destination parameter is defined
in a key-value pair. You can choose from three options for DKLogOutputSetting:
- 1
- Log to a file.
- 2
- Log to Standard Error.
- 3
- Log to Standard Console.
The default setting is DKLogOutputSetting=1.
- If you chose to log to a file (DKLogOutputSetting=1), you must also specify the log file name and log file size settings
in section 2.3. Section 2.3 contains two key-value pairs, which define
the log file name and output size (in megabytes).
- The default file name is DKLogOutputFileName=dklog.log.
- The default output size is DKLogOutputFileSize=5.
Attention: The log manager continues to append log
output into the existing log file. Monitor the size of the file and
periodically delete unwanted log output from the log file to prevent
the file from becoming too large.