Skip Headers
Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide
10g Release 3 (10.1.3)
B14428-01
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

Configuring EJB Logging

OC4J uses the standard JDK java.util.logging package and, by default, writes log messages to the <OC4J_HOME>/j2ee/home/log/<group>/oc4j/log.xml file.

This section describes:

Logging Namespaces

You can configure loggers for the following java.util.logging namespaces:

  • oracle.j2ee.ejb.annotation

  • oracle.j2ee.ejb.compilation

  • oracle.j2ee.ejb.database

  • oracle.j2ee.ejb.deployment

  • oracle.j2ee.ejb.lifecycle

  • oracle.j2ee.ejb.pooling

  • oracle.j2ee.ejb.runtime

  • oracle.j2ee.ejb.transaction

Logging Levels

You can configure log levels of: FINER, FINE, CONFIG, INFO, WARNING, and SEVERE.

Configuring Logging with Application Server Control Logging MBean

The simplest way to configure OC4J logging is to use Application Server Control (see "Using Oracle Enterprise Manager 10g Application Server Control").

Application Server Control shows all EJB-related logger names and you can specify attributes like log level using the Application Server Control interface.

Configuring Logging Using the j2ee-logging.xml File

You can configure OC4J logging using the <OC4J_HOME>/j2ee/home/config/j2ee-logging.xml file as Example 31-1 shows.

Example 31-1 j2ee-logging.xml File

<logger
    name='oracle.j2ee.ejb'
    level='NOTIFICATION:1'
    useParentHandlers='false'>
    <handler name='oc4j-handler'/>
    <handler name='console-handler'/>
</logger>

For more information, see:

Configuring Logging Using System Properties

You can configure OC4J logging using the oracle.j2ee.logging system property. This system property has the form:

oracle.j2ee.logging.<log-level>=<log-namespace>

Where:

  • <log-level> is one of fine, finer, or finest.

  • <log-namspace> is an oracle.j2ee.ejb namespace (see "Logging Namespaces").

Example 31-2 shows how to configure the logger for the oracle.j2ee.ejb.deployment namespace to finest.

Example 31-2 Configuring a Logger with a System Property

oracle.j2ee.logging.finest=oracle.j2ee.ejb.deployment