1.1 --- a/java/sql-dk/src/info/globalcode/sql/dk/DatabaseConnection.java Tue Dec 24 14:36:14 2013 +0100
1.2 +++ b/java/sql-dk/src/info/globalcode/sql/dk/DatabaseConnection.java Wed Dec 25 00:43:06 2013 +0100
1.3 @@ -26,6 +26,8 @@
1.4 import java.sql.PreparedStatement;
1.5 import java.sql.ResultSet;
1.6 import java.sql.SQLException;
1.7 +import java.util.logging.Level;
1.8 +import java.util.logging.Logger;
1.9
1.10 /**
1.11 *
1.12 @@ -33,6 +35,7 @@
1.13 */
1.14 public class DatabaseConnection implements AutoCloseable {
1.15
1.16 + private static final Logger log = Logger.getLogger(DatabaseConnection.class.getName());
1.17 private DatabaseDefinition databaseDefinition;
1.18 private Connection connection;
1.19
1.20 @@ -58,9 +61,11 @@
1.21
1.22 private void processCommand(SQLCommand sqlCommand, Formatter formatter) throws SQLException {
1.23 try (PreparedStatement ps = sqlCommand.prepareStatement(connection)) {
1.24 + log.log(Level.FINE, "Statement prepared");
1.25 sqlCommand.parametrize(ps);
1.26
1.27 boolean isRS = ps.execute();
1.28 + log.log(Level.FINE, "Statement executed");
1.29 if (isRS) {
1.30 try (ResultSet rs = ps.getResultSet()) {
1.31 processResultSet(sqlCommand, rs, formatter);