Log Error Messages

Oracle HDR uses the JDK Logging Framework to provide the ability to log error messages for debugging, error reporting and alerting purposes, as discussed in the following sections:

Teminology

Terminologies used by JDK Logging Framework:

Log Message

A log message contains the application messages in different formats supported by the JDK Logging Framework. The log message format is configurable in the JDK logging properties file logging.properties.

Level

A logging level is a threshold set by the system administrator to control message logging. The logging level can be set to any level supported by the JDK Logging Framework. Once set, only messages having a severity greater than or equal to the defined level are logged.

Example: Setting the level to SEVERE results in the logging of only error messages; setting the level to FINEST results in the logging of all messages.

Log4j Logging Configuration

HDR logging can be configured to use either JDK Logging or Log4J Logging Framework. Th user has to specify which logging framework he would want to use through a system property: HDR_LOG_PROVIDER. The possible list of values for this property are JDK, LOG4J, jdk or log4j. This property should be included in the WebLogic Server startup script as a JVM argument. In case the user doesn't supply this property then, the application falls back on JDK Logging.

To use Log4j Logging, the following steps are required:

  1. Download log4j-api-2.10.0.jar and log4j-core-2.10.0.jar files from the Apache website and copy them to ${WL_DOMAIN_HOME}/lib directory.
  2. Create the log4j2.properties configuration file and copy it to the ${WL_DOMAIN_HOME} directory. A sample configuration file can be found here.
  3. Add the -Dlog4j.configurationFile=log4j2.properties JVM argument to WebLogic Server startup script.
  4. Add the JVM argument -DHDR_LOG_PROVIDER=LOG4J.
  5. Restart the WebLogic Server.

Log Configuration Parameters

By default, the HDR installer creates the JDK logging properties file logging.properties in the hdr_domain directory. The logging.properties sets the default logging to file logging with log file name hdr.log. The default log level WARNING is configured in the log module CTBAppsLogger.

HDR Terminology jobs use ETSJobLogger for generating job log files. The default log level is FINEST (configurable using logging.properties) and the default handler is file handler which takes name of log file from HDR Terminology PROGRAM_ARGUMENT (this is to maintain specific log file names for specific types of jobs.

HDR Terminology jobs use an internal logger for generating Execution report. This logger is internally configured and its attributes are not configurable.