Small log clarification.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@609775 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Patrick Linskey 2008-01-07 20:56:22 +00:00
parent 4140d243a4
commit 6f29454e48
1 changed files with 10 additions and 2 deletions

View File

@ -418,7 +418,15 @@ public class LoggingConnectionDecorator implements ConnectionDecorator {
*/ */
private void logSQL(Statement stmnt) throws SQLException { private void logSQL(Statement stmnt) throws SQLException {
if (_logs.isSQLEnabled()) 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 { public int[] executeBatch() throws SQLException {
logSQL(this); logBatchSQL(this);
long start = System.currentTimeMillis(); long start = System.currentTimeMillis();
try { try {
return super.executeBatch(); return super.executeBatch();