diff --git a/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java b/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java index 9b37a3ea5..c403e8038 100644 --- a/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java +++ b/openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/LoggingConnectionDecorator.java @@ -418,7 +418,15 @@ public class LoggingConnectionDecorator implements ConnectionDecorator { */ 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 class LoggingConnectionDecorator implements ConnectionDecorator { } public int[] executeBatch() throws SQLException { - logSQL(this); + logBatchSQL(this); long start = System.currentTimeMillis(); try { return super.executeBatch();