October 23, 2016
Hot Topics:

Oracle JDBC Logging Using java.util.logging

  • January 20, 2010
  • By Developer.com Staff
  • Send Email »
  • More Articles »

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.

Comment and Contribute


(Maximum characters: 1200). You have characters left.



Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Sitemap | Contact Us

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