logging-service Configuring the Oracle CEP Logging Service

Configuring Logging and Debugging for Oracle CEP 15-11 For example: entry keyCQLProcessorkey valueDebugvalue entry ■ Application name : the module name of any Oracle CEP server or user-defined application. For example: entry keysample.HelloWorldkey valueDebugvalue entry ■ Package name : the name of any Oracle CEP server or user-supplied Java package. For example: entry keycom.bea.wlevs.edekey valueDebugvalue entry For more information on Oracle CEP server packages, see the Oracle Fusion Middleware Java API Reference for Oracle Complex Event Processing. ■ Class name : the fully qualified name of any Oracle CEP server or user-defined class. For example: entry keycom.bea.wlevs.cep.core.EPRuntimeImplkey valueDebugvalue entry For more information on Oracle CEP server classes, see the Oracle Fusion Middleware Java API Reference for Oracle Complex Event Processing. 4. Set the value element to a severity level. See Section 15.1.1.2, Using Log Severity Levels . For example: entry keyCQLProcessorkey valueDebugvalue entry Management Applies to log messages from Oracle CEP server general JMX-related management API operations. Monitor Applies to log messages from the Oracle CEP server monitoring service. Recplay Applies to log messages from Oracle CEP server event recording and playback operations. Spring Applies to log messages from Spring container operations. Stream Applies to log messages from stream instances running on the Oracle CEP server. Table 15–5 Cont. Logging Component Name Constants Component Name Constant Description 15-12 Oracle Complex Event Processing Administrators Guide This severity level applies to the module you specified in the key element and overrides the default Oracle CEP server logging severity level set in the logger-severity element that Example 15–2 shows. 5. Repeat from step 2 for any other modules. 6. Save and close the config.xml file.

15.3 Configuring Log4j Logging

Oracle CEP supports the open-source log4j logging system. This section describes the following tasks: ■ Section 15.3.1, Configuring log4j Properties ■ Section 15.3.2, Configuring Application Manifest ■ Section 15.3.3, Enabling Log4j Logging ■ Section 15.3.4, Debugging Log4j Logging For more information, see Section 15.1.3, Log4j Logger .

15.3.1 Configuring log4j Properties

The default configuration file is log4j.properties. It can be overridden by using the log4j.configuration system property. See https:www.qos.chshopproductslog4jlog4j-Manual.jsp . The following is an example of a log4j.properties file: Example 15–3 Example log4j.properties File log4j.rootLogger=debug, R log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=D:log4jlogsmywebapp.log log4j.appender.R.MaxFileSize=10MB log4j.appender.R.MaxBackupIndex=10 log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=p t c - mn log4j.logger=DEBUG, R

15.3.2 Configuring Application Manifest

Update the MANIFEST.MF file of your application to import the following required Log4j packages. Import-Package: org.apache.log4j;version=1.2.13, org.apache.log4j.config;version=1.2.13, ...

15.3.3 Enabling Log4j Logging

To specify logging to a Log4j Logger, set the following system properties on the command line: -Dorg.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.LogFact oryImpl