15-2 Oracle Complex Event Processing Administrators Guide
Oracle CEP also provides a variety of debugging options that you can enable and disable to help diagnose your Oracle CEP applications. See
Section 15.5, Configuring Oracle CEP Debugging Options
.
15.1.1 Commons Apache Logging Framework
Oracle CEP provides a commons-logging interface. The interface provides commons.logging.LogFactory and Log interface implementations. It includes an
extension of the org.apache.commons.logging.LogFactory class that acts as a factory to create an implementation of the org.apache.commons.logging.Log
that delegates to the LoggingService in the logging module. The name of this default implementation is weblogic.logging.commons.LogFactoryImpl.
This section describes the following:
■
Section 15.1.1.1, Setting the Log Factory
■
Section 15.1.1.2, Using Log Severity Levels
■
Section 15.1.1.3, Log Files
■
Section 15.1.1.4, Log Message Format
■
Section 15.1.2, OSGi Framework Logger For more information, see
http:jakarta.apache.orgcommonsloggingapidocsindex.html .
15.1.1.1 Setting the Log Factory
The following provides information on setting the log factory using system properties:
■
The highest priority is given to the system property org.apache.commons.logging.LogFactory.
■
You can set logging from the command line using: -Dorg.apache.commons.logging.LogFactory=weblogic.logging.commons.LogFactoryImpl
■
You can programmatically implement the logging by: import org.apache.commons.logging.LogFactory;
System.setProperty LogFactory.FACTORY_PROPERTY,
weblogic.logging.commons.LogFactoryImpl ;
■
The weblogic.logging.commons.LogFactoryImpl is the default log factory, if not explicitly set.
■
To use another logging implementation, you must use the standard commons logging factory implementation. The
Note: For information on Oracle CEP security auditor logging, see
Section 10.9, Configuring the Oracle CEP Security Auditor .
Note: For information how to parse message catalogs to validate and
generate classes used for localizing text in log messages, see Managing Log Message Catalogs in the Oracle Complex Event
Processing Developers Guide for Eclipse.
Configuring Logging and Debugging for Oracle CEP 15-3
org.apache.commons.logging.impl.LogFactoryImpl implementation is available in the commons logging jar. For example:
-Dorg.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.LogFact oryImpl
or the equivalent programming would be: System.setProperty
LogFactory.FACTORY_PROPERTY, org.apache.commons.logging.impl.LogFactoryImpl
;
15.1.1.2 Using Log Severity Levels
Each log message has an associated severity level. The level gives a rough guide to the importance and urgency of a log message. Predefined severities, ranging from TRACE
to EMERGENCY, are converted to a log level when dispatching a log request to the logger. A log level object can specify any of the following values, from lowest
left-most to highest right-most impact:
TRACE, DEBUG, INFO, NOTICE, WARNING, ERROR, CRITICAL, ALERT, EMERGENCY You can set a log severity level on the logger, the handler, and a user application.
When set on the logger, none of the handlers receive an event which is rejected by the logger. For example, if you set the log level to NOTICE on the logger, none of the
handlers will receive INFO level events. When you set a log level on the handler, the restriction only applies to that handler and not the others. For example, turning DEBUG
off for the File Handler means no DEBUG messages will be written to the log file, however, DEBUG messages will be written to standard out.
Users Oracle CEP module owners or owners of user applications are free to define the names that represent the logging category type used by the Apache commons
logging for individual modules. However if the category names are defined as package names then based on the naming convention, a logging level hierarchy is
assumed by default. For example, if two modules name their logging category names com.oracle.foo and com.oracle.foo.bar, then com.oracle.foo becomes the
root node of com.oracle.foo.bar. This way any logging level applied to parent node com.oracle.foo automatically applies to com.oracle.foo.bar, unless the
child node overrides the parent.
In other words, if the logging severity is specified for a node, it is effective unless the severity is inherited from the nearest parent whose severity is explicitly configured.
The root node is always explicitly configured, so if nothing else if set, then all the nodes inherit the severity from the root.
Table 15–1 lists the severity levels of log messages.
Table 15–1 Log Message Severity
Severity Meaning
TRACE Used for messages from the Diagnostic Action Library. Upon enabling diagnostic
instrumentation of server and application classes, TRACE messages follow the request path of a method.
DEBUG A debug message was generated.
INFO Used for reporting normal operations, a low-level informational message.
NOTICE An informational message with a higher level of importance.
WARNING A suspicious operation or configuration has occurred but it might not affect normal
operation.