Logging levels

Along with the standard levels supported by log4j utility, an additional custom logging level TIMER is also supported to display the start time and end time of a block or method. The TIMER logging level has a higher priority than DEBUG logging level and lower priority than INFO logging level.

The Omni-Configurator's implementation of logging provides the following logging levels:
  • FATAL
  • ERROR
  • WARN
  • INFO
  • TIMER
  • DEBUG
  • TRACE
Note: The DEBUG and TRACE logging levels consume large amount of computing resource and generate large amount of log entries. Therefore, it is recommended that the logging level is set to ERROR.

Setting up the instance logging level for each tenant

Setting up instance logging level for a tenant controls the message priority for the entire deployment. That is only the messages with a priority equal to or higher than the instance logging level are logged. For example, if the instance logging level for a tenant is set up to INFO, the Omni-Configurator server only logs those messages that contains a property equal to or greater than the INFO.

By default, the logging level is set to INFO for an instance for all the tenants. To change the logging level for a tenant, use the following API:
http://<OMNI_CONFIG_SERVER>:<PORT>/configurator/api/organization/<ORG_NAME>/logger/level/<LOG_LEVEL>
For example, http://configurator.in.ibm.com:9080/configurator/api/organization/matrix/logger/level/DEBUG

This API sets the logging level for an organization matrix on the particular instance to DEBUG. Any API call for the organization matrix logs messages with DEBUG or above priority. This API is an administrative API, and therefore, its usage is limited or authorized.

Setting up the logging level for each API request

Logging level can also be set for an individual API request using the logLevel request parameter. If the logLevel parameter is empty or null, messages are not logged for that particular API request. If the logging level set for the logLevel parameter has lesser priority than the logging level set for the instance, messages are not logged for that particular API request. The following is a sample URL for the getModel REST API with the logLevel parameter set TIMER.
http://configurator.in.ibm.com:9080/configurator/api/organization/matrix/models/PCTest11?language=en&country=US&responseFormat=xml&logLevel=TIMER