Oracle® Application Development Framework Developer's Guide
10g Release 3 (10.1.3) B25386-01 |
|
![]() Previous |
![]() Next |
ADF Faces leverages the Java Logging API (java.util.logging.Logger
) to provide logging functionality when you run a debugging session. Java Logging is a standard API that is available in the Java Platform, starting with JDK 1.4. For the key elements, see the section "Java Logging Overview" at http://java.sun.com/j2se/1.4.2/docs/guide/util/logging/overview.html
.
Typically you would want to configure the following in j2ee-logging.xml
:
Change the logging level for Oracle ADF packages. See Section A.9.1.1.
Redirect the log output to a location, like a file, in addition to the default Log window in JDeveloper. See Section A.9.1.2.
Change the directory path that determines where your log file resides. See Section A.9.1.3.
The following JSF tasks are supported by the j2ee-logging.xml
file.
When you want to change the logging level of individual Oracle ADF packages, edit <logger>
in the <loggers>
element of j2ee-logging.xml
(see Example A-17). The default level of logging is INFO
. Oracle recommends level="FINE"
for detailed log messages. Note that package names are hierarchically inclusive. For instance, if you change the level of oracle.adf
, the level specified will also apply to all classes that begin with the path oracle.adf
. To change the level of specific classes, supply the full path; for instance, a level set for the package name oracle.adf.controller
will not apply to other branches of the oracle.adf
package.
For details about setting logging when debugging ADF applications, see Section 16.4.1, "Creating an Oracle ADF Debugging Configuration".
The default logger (name="oracle"
) is associated with two handlers: one for file output and another for console output (JDeveloper Log window). By default log messages are output to both locations at the same time. When you want to redirect the output for the log messages, edit <handler>
in the <logger>
element of j2ee-logging.xml
(see Example A-18). For example, you can comment out the <handler name="oc4j-handler"/>
when you want the output to only go to the JDeveloper Log window.
When you want to change where the log files reside, edit <log_handler>
in the <log_handlers>
element of j2ee-logging.xml
(see Example A-19). The default directory for the log file is ../log/oc4j
.