openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p..@apache.org
Subject svn commit: r609775 - /openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java
Date Mon, 07 Jan 2008 20:56:24 GMT
Author: pcl
Date: Mon Jan  7 12:56:22 2008
New Revision: 609775

URL: http://svn.apache.org/viewvc?rev=609775&view=rev
Log:
Small log clarification.

Modified:
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java

Modified: openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java?rev=609775&r1=609774&r2=609775&view=diff
==============================================================================
--- openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java
(original)
+++ openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java
Mon Jan  7 12:56:22 2008
@@ -418,7 +418,15 @@
          */
         private void logSQL(Statement stmnt) throws SQLException {
             if (_logs.isSQLEnabled())
-                _logs.logSQL("executing " + stmnt, this); 
+                _logs.logSQL("executing " + stmnt, this);
+        }
+
+        /**
+         * Log time elapsed since given start.
+         */
+        private void logBatchSQL(Statement stmnt) throws SQLException {
+            if (_logs.isSQLEnabled())
+                _logs.logSQL("executing batch " + stmnt, this);
         }
 
         /**
@@ -864,7 +872,7 @@
             }
 
             public int[] executeBatch() throws SQLException {
-                logSQL(this);
+                logBatchSQL(this);
                 long start = System.currentTimeMillis();
                 try {
                     return super.executeBatch();



Mime
View raw message