From 6f29454e48415ac92f14e407119a69dfcddea9c4 Mon Sep 17 00:00:00 2001 From: Patrick Linskey Date: Mon, 7 Jan 2008 20:56:22 +0000 Subject: [PATCH] Small log clarification. git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@609775 13f79535-47bb-0310-9956-ffa450edef68 --- .../openjpa/lib/jdbc/LoggingConnectionDecorator.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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();