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
java.util.logging.config.fileproperty. - Create the configuration file.
- In the configuration file, indicate the level of detail by setting the
java.util.logging.FileHandler.levelproperty.
The white paper provides further details and examples.
0 Comments (click to add your comment)
Networking Solutions
