Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide 10g (10.1.3.1.0) Part Number B28221-02 |
|
|
View PDF |
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 the following:
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
You can configure the following log levels: FINER
, FINE
, CONFIG
, INFO
, WARNING
, and SEVERE
.
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 such as log level using the Application Server Control interface.
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 the following:
You can configure OC4J logging using the oracle.j2ee.logging
system property. This system property has the following format:
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.
For EJB 3.0 JPA applications, you can use vendor extensions to customize how the TopLink JPA persistence provider logs.
For more information, see "TopLink JPA Extensions for Logging".
For applications that use the Oracle JMS Connector to access a JMS message service, you can customize how the Oracle JMS Connector logs using activation configuration property LogLevel
.
For more information, see "Configuring an EJB 3.0 MDB to Access a Message Service Provider Using J2CA".