protected String logFailedRowChangeSQL(StringBuffer stmt,OneRowChange oneRowChange){
  try {
    ArrayList<OneRowChange.ColumnSpec> keys=oneRowChange.getKeySpec();
    ArrayList<OneRowChange.ColumnSpec> columns=oneRowChange.getColumnSpec();
    ArrayList<ArrayList<OneRowChange.ColumnVal>> keyValues=oneRowChange.getKeyValues();
    ArrayList<ArrayList<OneRowChange.ColumnVal>> columnValues=oneRowChange.getColumnValues();
    String log="Failing statement : " + stmt.toString() + "\nArguments:";
    for (int row=0; row < columnValues.size() || row < keyValues.size(); row++) {
      log+=logFailedRowChangeValues(keys,columns,keyValues,columnValues,row);
    }
    if (log.length() > maxSQLLogLength)     log=log.substring(0,maxSQLLogLength);
    return log;
  }
 catch (  Exception e) {
    if (logger.isDebugEnabled())     logger.debug("logFailedRowChangeSQL failed to log, because: " + e.getMessage());
  }
  return null;
}

protected String logFailedRowChangeSQL ( StringBuffer stmt , OneRowChange oneRowChange ) { try { ArrayList < OneRowChange . ColumnSpec > keys = oneRowChange . getKeySpec ( ) ; ArrayList < OneRowChange . ColumnSpec > columns = oneRowChange . getColumnSpec ( ) ; ArrayList < ArrayList < OneRowChange . ColumnVal > > keyValues = oneRowChange . getKeyValues ( ) ; ArrayList < ArrayList < OneRowChange . ColumnVal > > columnValues = oneRowChange . getColumnValues ( ) ; String log = "Failing statement : " + stmt . toString ( ) + "\nArguments:" ; for ( int row = 0 ; row < columnValues . size ( ) || row < keyValues . size ( ) ; row ++ ) { log += logFailedRowChangeValues ( keys , columns , keyValues , columnValues , row ) ; } if ( log . length ( ) > maxSQLLogLength ) log = log . substring ( 0 , maxSQLLogLength ) ; return log ; } catch ( Exception e ) { if ( logger . isDebugEnabled ( ) ) logger . debug ( "logFailedRowChangeSQL failed to log, because: " + e . getMessage ( ) ) ; } return null ; }
logs prepared statement and it ' s arguments into error log stream . trims the message if it exceeds maxsqlloglength .
