Structure of Configuration Files

Each product has at least one logging configuration file, logging.xml. Components have descriptive names; for example: loggingCOMPONENT_NAME.xml. The file structure of logging.xml is based on the concepts of java.utility.logging: log handlers and logger.

The following is an excerpt of a sample configuration file, logging.xml, for EPM Workspace:

<?xml version="1.0" encoding="UTF-8" ?> 
- <logging_configuration>
- <log_handlers>
  <log_handler name="console-handler" class="oracle.core.ojdl.logging.ConsoleHandler" level="WARNING:32" formatter="oracle.core.ojdl.weblogic.ConsoleFormatter" /> 
- <log_handler name="odl-handler" class="oracle.core.ojdl.logging.ODLHandlerFactory" filter="oracle.dfw.incident.IncidentDetectionLogFilter">
  <property name="path" value="${domain.home}/servers/${weblogic.Name}/logs/${weblogic.Name}-diagnostic.log" /> 
  <property name="maxFileSize" value="10485760" /> 
  <property name="maxLogSize" value="104857600" /> 
  <property name="encoding" value="UTF-8" /> 
  <property name="useThreadName" value="true" /> 
  <property name="supplementalAttributes" value="J2EE_APP.name,J2EE_MODULE.name,WEBSERVICE.name,WEBSERVICE_PORT.name,composite_instance_id,component_instance_id,composite_name,component_name" /> 
  </log_handler>
  <log_handler name="wls-domain" class="oracle.core.ojdl.weblogic.DomainLogHandler" level="WARNING" /> 
- <log_handler name="owsm-message-handler" class="oracle.core.ojdl.logging.ODLHandlerFactory">
  <property name="path" value="${domain.home}/servers/${weblogic.Name}/logs/owsm/msglogging" /> 
  <property name="maxFileSize" value="10485760" /> 
  <property name="maxLogSize" value="104857600" /> 
  <property name="encoding" value="UTF-8" /> 
  <property name="supplementalAttributes" value="J2EE_APP.name,J2EE_MODULE.name,WEBSERVICE.name,WEBSERVICE_PORT.name" /> 
  </log_handler>
- <log_handler name="em-log-handler" class="oracle.core.ojdl.logging.ODLHandlerFactory" level="NOTIFICATION:32" filter="oracle.dfw.incident.IncidentDetectionLogFilter">
  <property name="path" value="${domain.home}/servers/${weblogic.Name}/sysman/log/emoms.log" /> 
  <property name="format" value="ODL-Text" /> 
  <property name="useThreadName" value="true" /> 
  <property name="maxFileSize" value="5242880" /> 
  <property name="maxLogSize" value="52428800" /> 
  <property name="encoding" value="UTF-8" /> 
  </log_handler>
- <log_handler name="em-trc-handler" class="oracle.core.ojdl.logging.ODLHandlerFactory" level="TRACE:32">
  <property name="logreader:" value="off" /> 
  <property name="path" value="${domain.home}/servers/${weblogic.Name}/sysman/log/emoms.trc" /> 
  <property name="format" value="ODL-Text" /> 
  <property name="useThreadName" value="true" /> 
  <property name="locale" value="en" /> 
  <property name="maxFileSize" value="5242880" /> 
  <property name="maxLogSize" value="52428800" /> 
  <property name="encoding" value="UTF-8" /> 
  </log_handler>
...
...
<loggers>
- <logger name="" level="WARNING:1">
  <handler name="odl-handler" /> 
  <handler name="wls-domain" /> 
  <handler name="console-handler" /> 
  </logger>
  <logger name="oracle" level="NOTIFICATION:1" /> 
  <logger name="oracle.adf" /> 
  <logger name="oracle.adf.desktopintegration" /> 
  <logger name="oracle.adf.faces" /> 
  <logger name="oracle.adf.controller" /> 
  <logger name="oracle.adfinternal" /> 
  <logger name="oracle.adfinternal.controller" /> 
  <logger name="oracle.jbo" /> 
...
...

Configuration File Properties

The following table lists the configurable properties in logging.xml.

Table 3. Configuration Properties

Property NameDescription

path

Log path

format

Format to use. The value must be ODL-Text

maxFileSize

The maximum size in bytes for each log file

When the main log file reaches the given size, it triggers a log rotation, where the main log file is archived and a new log file is created.

maxLogSize

The maximum size in bytes for the entire log

Older archive files are deleted to keep the total log size under the given limit.

rotationFrequency

The frequency, in minutes, for rotating the logs

The value must be a number (minutes), or hourly, daily, or weekly (values are not case-sensitive).

baseRotationTime

The base time for time-based log rotation

The log is rotated every rotationFrequency minutes from the base time. The default base time is January 1, 1970, UTC. The time must be in one of these formats:
  • HH:mm

  • yyyy-MM-dd

  • yyyy-MM-ddTHH:mm

  • yyyy-MM-ddTHH:mm:ss.sTZ

    where TZ is the time one indicator and can be either Z, indicating UTC, or specify the time zone offset in the format +/-HH:mmm

If the time format does not specify a time zone, the local time zone is used.

retentionPeriod

How long older log file should be kept

Files that are older than the given period are deleted. Files are deleted only when there is a log rotation; no background thread deletes log files. As a result, files may not be deleted for some time after the retention period expires. The value must be a number (minutes), or day, week, month (30 days) or year (values are not case-sensitive).

encoding

The name of the character encoding to use

For this release, XML files must be UTF-8 encoded to handle extended characters. The default is <?xml version="1.0" encoding="UTF-8" ?>

.

If file values do not have extended characters, then remove encoding.

supplementalAttributes

A comma-separated list of supplemental attribute names, which can be added to each log message

The attribute value must be defined in class ExecutionContext.

useSourceClassAndMethod

Whether the Java source class and method name should be added to each log message

The value is a Level name. Messages of a given level or lower include the source class and method name. The constants true and false are also accepted as aliases for OFF and ALL. The default value is TRACE:1 (FINE).

useDefaultAttributes

Whether default attribute values should be added to each log message

The default attributes that can be assigned are HOST_ID, HOST_NWADDR and USER_ID. The value should be true or false. The default value is true for the ODL-XML format and false for the ODL-Text format.

includeMessageArguments

Whether message arguments should be included with formatted log messages that also have a message ID

The value should be true or false. The default value is true in most cases true is the correct value.

useThreadName

Sets the useThreadName flag, which flags controls if the handler attempts to log the real thread name instead of the threadID provided by the java.util.logging.LogRecord. If the flag is true, the handler attempts to log the real thread name. In some cases, the handler may not be able to determine the real thread name, in which case it will log the threadID. The default value is true.

useRealThreadId

The useRealThreadId flag, which flags controls if the handler attempts to log the real thread ID instead of the threadID provided by the java.util.logging.LogRecord

If the flag is true, the handler will attempt to log the real thread ID. In some cases, the handler may not be able to determine the real thread name, in which case it will log the threadID. The default value is false. Logging the real Thread ID is mutually exclusive with the useThreadName property. If useThreadName is true, the value of the useRealThreadId property is ignored.

locale

Default Locale override for localizing messages

The default value is the default Locale.

keepOpen

The keepOpen flag setting

In most cases you should use the default value. The value should be true or false. If the flag is set to true, the main log file is kept open all times. If the flag is set to false, the main log file is open and closed upon each log operation. The default value is true.

deleteFiles

The deleteFiles flag setting

The value should be true or false. This flag determines whether archive files can be deleted when the total log size reaches the maximum limit. In most cases, the default value for the flag is true, which means that old files can be deleted. In rare use cases, in which archive files should not be deleted, this flag can be set to false.

Note:

If deleteFiles is set to false, and a maxLogSize limit is set, messages are not logged after the log size reaches the specified maxLogSize limit.

autoFlushLevel

The level setting for autoflushing

The ODLHandler allows log records to be buffered, but it automatically flushes the buffer when it gets a log record with level equal to or higher than the specified autoFlush level. The default value is NOTIFICATION:1.

addJvmNumber

The JVM number added to the log file name

The JVM number is defined by system property oracle.process.index. If the system property is not set, this option is ignored.

applicationContextProvider

The name of a class that implements the ApplicationContext interface

The class must have a default constructor. The special value disabled can be used to disable logging of application name. The default application context provider is platform-specific; in most cases you need not set this property.

userContextProvider

The name of a class that implements the UserContext interface

The class must have a default constructor. The special value disabled can be used to disable logging of the user name. The default user context provider is platform-specific; in most cases you need not set this property.

Message Types

Message type is the standard ODL terminology for a log level. Message types are controlled from the configuration file in loggers, and the recommendation is to set a lower message type as the default, to allow finer control.

Table 4. Message Types

Message TypeDescription

ERROR

A serious problem that requires immediate attention from the System Administrator and is not caused by a product bug.

WARNING

A potential problem that the System Administrator should review

NOTIFICATION

A major lifecycle event such as the activation or deactivation of a primary subcomponent or feature

TRACE

Trace or debug information for events, such as public API entry/exit points. The messages should be understandable to those who do not know internal implementation details.

UNKNOWN

May be used when the type is unknown

Tip:

Administrators can change the EPM Workspace logging level using WebLogic Administration Console without modifying the configuration file. See Changing the EPM Workspace Logging Level in WebLogic Administration Server Console.