private void doWrite(final LogEntry logEntry) throws SQLException {
		if (checkConnection()) {
			if (batch) {
				batchCount += 1;
			}

			try {
				for (int i = 0; i < tokens.size(); ++i) {
					tokens.get(i).apply(logEntry, statement, i + 1);
				}
			} catch (SQLException ex) {
				resetConnection();
				throw ex;
			}

			try {
				if (batch) {
					statement.addBatch();
					if (batchCount >= MAX_BATCH_SIZE) {
						statement.executeBatch();
						batchCount = 0;
					}
				} else {
					statement.executeUpdate();
				}
			} catch (SQLException ex) {
				resetConnection();
				throw ex;
			}
		} else {
			lostCount += 1;
		}
	}
private void doWrite ( final LogEntry logEntry ) throws SQLException { if ( checkConnection ( ) ) { if ( batch ) { batchCount += 1 ; } try { for ( int i = 0 ; i < tokens . size ( ) ; ++ i ) { tokens . get ( i ) . apply ( logEntry , statement , i + 1 ) ; } } catch ( SQLException ex ) { resetConnection ( ) ; throw ex ; } try { if ( batch ) { statement . addBatch ( ) ; if ( batchCount >= MAX_BATCH_SIZE ) { statement . executeBatch ( ) ; batchCount = 0 ; } } else { statement . executeUpdate ( ) ; } } catch ( SQLException ex ) { resetConnection ( ) ; throw ex ; } } else { lostCount += 1 ; } }
Unsynchronized method for inserting a log entry.

@param logEntry
Log entry to insert

@throws SQLException
Database access failed