Oracle JDBC Logging Using java.util.logging
The Oracle JDBC drivers for older versions of Java used a proprietary mechanism to generate log output. The drivers for Java 1.4 and later use the Java standard package, java.util.logging. A recent Oracle white paper describes in detail how to use java.util.logging with Oracle JDBC drivers. Here's an overview.
- Make sure a logging-enabled JAR file is the only Oracle JDBC JAR file in your classpath.
- Enable logging by setting the
oracle.jdbc.Traceproperty to true, or by writing Java code to enable logging programmatically.
- Identify the logging configuration file to the Java runtime by setting the
- Create the configuration file.
- In the configuration file, indicate the level of detail by setting the
The white paper provides further details and examples.