}
@Override
protected void subAppend(Object eventObject, Connection connection,
PreparedStatement insertStatement) throws Throwable {
ILoggingEvent event = (ILoggingEvent) eventObject;
bindLoggingEventWithInsertStatement(insertStatement, event);
// This is expensive... should we do it every time?
bindCallerDataWithPreparedStatement(insertStatement, event.getCallerData());
int updateCount = insertStatement.executeUpdate();
if (updateCount != 1) {
addWarn("Failed to insert loggingEvent");
}
int eventId = selectEventId(insertStatement, connection);
Map<String, String> mergedMap = mergePropertyMaps(event);
insertProperties(mergedMap, connection, eventId);
if (event.getThrowableProxy() != null) {
insertThrowable(event.getThrowableProxy().getStackTraceElementProxyArray(), connection, eventId);
}
}