Back to article

Oracle JDBC Logging Using java.util.logging

January 20, 2010

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.

  1. Make sure a logging-enabled JAR file is the only Oracle JDBC JAR file in your classpath.
  2. Enable logging by setting the oracle.jdbc.Trace property to true, or by writing Java code to enable logging programmatically.
  3. Identify the logging configuration file to the Java runtime by setting the java.util.logging.config.file property.
  4. Create the configuration file.
  5. In the configuration file, indicate the level of detail by setting the java.util.logging.FileHandler.level property.

The white paper provides further details and examples.

Sitemap | Contact Us

Thanks for your registration, follow us on our social networks to keep up-to-date