http://www.developer.com/white_papers/article.php/387550/Oracle-JDBC-Logging-Using-javautillogging.htm
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. The white paper provides further details and examples.
Oracle JDBC Logging Using java.util.logging
January 20, 2010
oracle.jdbc.Trace property to true, or by writing Java code to enable logging programmatically.java.util.logging.config.file property.java.util.logging.FileHandler.level property.