public ResultSet getImportedKeys(String catalog, String schema, String table) throws SQLException { if (_logs.isJDBCEnabled()) _logs.logJDBC("getImportedKeys: " + catalog + ", " + schema + ", " + table, LoggingConnection.this); return super.getImportedKeys(catalog, schema, table); }
/** * Log time elapsed since given start. */ private void logTime(long startTime) throws SQLException { if (_logs.isSQLEnabled()) _logs.logSQL("spent", startTime, this); }
/** * Log a SQL message on behalf of the given connection. */ public void logSQL(String msg, long startTime, Connection conn) { log(msg, conn, _sqlLog, startTime); }
new LoggingConnectionDecorator(); Configurations.configureInstance(lcd, conf, opts); lcd.getLogs().setJDBCLog(jdbcLog); lcd.getLogs().setSQLLog(sqlLog); decorators.add(lcd);
public boolean execute(String sql) throws SQLException { logSQL(this); long start = System.currentTimeMillis(); try { return super.execute(sql); } catch (SQLException se) { throw wrap(se, LoggingPreparedStatement.this); } finally { logTime(start); clearLogParameters(true); handleSQLWarning(LoggingPreparedStatement.this); } }
private boolean shouldTrackParameters() { return _trackParameters || _logs.isSQLEnabled(); }
return; Log log = _logs.getJDBCLog(); for (; warning != null; warning = warning.getNextWarning()) { switch (_warningAction) {
new LoggingConnectionDecorator(); Configurations.configureInstance(lcd, conf, opts); lcd.getLogs().setJDBCLog(jdbcLog); lcd.getLogs().setSQLLog(sqlLog); decorators.add(lcd);
public int executeUpdate() throws SQLException { logSQL(this); long start = System.currentTimeMillis(); try { return super.executeUpdate(); } catch (SQLException se) { throw wrap(se, LoggingPreparedStatement.this); } finally { logTime(start); clearLogParameters(true); handleSQLWarning(LoggingPreparedStatement.this); } }
private boolean shouldTrackParameters() { return _printParameters || _logs.isSQLEnabled(); }
return; Log log = _logs.getJDBCLog(); for (; warning != null; warning = warning.getNextWarning()) { switch (_warningAction) {
public ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) throws SQLException { if (_logs.isJDBCEnabled()) _logs.logJDBC("getProcedureColumns: " + catalog + ", " + schemaPattern + ", " + procedureNamePattern + ", " + columnNamePattern, LoggingConnection.this); return super.getProcedureColumns(catalog, schemaPattern, procedureNamePattern, columnNamePattern); }
/** * Log time elapsed since given start. */ private void logBatchSQL(Statement stmnt) throws SQLException { if (_logs.isSQLEnabled()) _logs.logSQL("executing batch " + stmnt, this); }
new LoggingConnectionDecorator(); Configurations.configureInstance(lcd, conf, opts); lcd.getLogs().setJDBCLog(jdbcLog); lcd.getLogs().setSQLLog(sqlLog); decorators.add(lcd);
/** * Log a JDBC message on behalf of the given connection. */ public void logJDBC(String msg, long startTime, Connection conn) { log(msg, conn, _jdbcLog, startTime); }
public boolean execute() throws SQLException { logSQL(this); long start = System.currentTimeMillis(); try { return super.execute(); } catch (SQLException se) { throw wrap(se, LoggingPreparedStatement.this); } finally { logTime(start); clearLogParameters(true); handleSQLWarning(LoggingPreparedStatement.this); } }
private boolean shouldTrackParameters() { return _printParameters || _logs.isSQLEnabled(); }
return; Log log = _logs.getJDBCLog(); for (; warning != null; warning = warning.getNextWarning()) { switch (_warningAction) {
public ResultSet getTypeInfo() throws SQLException { if (_logs.isJDBCEnabled()) _logs.logJDBC("getTypeInfo", LoggingConnection.this); return super.getTypeInfo(); }
/** * Log time elapsed since given start. */ private void logTime(long startTime) throws SQLException { if (_logs.isSQLEnabled()) _logs.logSQL("spent", startTime, this); }