public class DBAppender extends DBAppenderBase<ILoggingEvent>
Modifier and Type | Field and Description |
---|---|
protected static java.lang.reflect.Method |
GET_GENERATED_KEYS_METHOD |
protected java.lang.String |
insertExceptionSQL |
protected java.lang.String |
insertPropertiesSQL |
protected java.lang.String |
insertSQL |
cnxSupportsBatchUpdates, cnxSupportsGetGeneratedKeys, connectionSource, sqlDialect
name, started
context
Constructor and Description |
---|
DBAppender() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.reflect.Method |
getGeneratedKeysMethod() |
protected java.lang.String |
getInsertSQL() |
protected void |
insertProperties(java.util.Map<java.lang.String,java.lang.String> mergedMap,
java.sql.Connection connection,
long eventId) |
protected void |
insertThrowable(IThrowableProxy tp,
java.sql.Connection connection,
long eventId) |
protected void |
secondarySubAppend(ILoggingEvent event,
java.sql.Connection connection,
long eventId) |
void |
setDbNameResolver(DBNameResolver dbNameResolver) |
void |
start() |
protected void |
subAppend(ILoggingEvent event,
java.sql.Connection connection,
java.sql.PreparedStatement insertStatement) |
append, getConnectionSource, selectEventId, setConnectionSource, stop
addFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, toString
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
protected java.lang.String insertPropertiesSQL
protected java.lang.String insertExceptionSQL
protected java.lang.String insertSQL
protected static final java.lang.reflect.Method GET_GENERATED_KEYS_METHOD
public void setDbNameResolver(DBNameResolver dbNameResolver)
public void start()
start
in interface LifeCycle
start
in class DBAppenderBase<ILoggingEvent>
protected void subAppend(ILoggingEvent event, java.sql.Connection connection, java.sql.PreparedStatement insertStatement) throws java.lang.Throwable
subAppend
in class DBAppenderBase<ILoggingEvent>
java.lang.Throwable
protected void secondarySubAppend(ILoggingEvent event, java.sql.Connection connection, long eventId) throws java.lang.Throwable
secondarySubAppend
in class DBAppenderBase<ILoggingEvent>
java.lang.Throwable
protected java.lang.reflect.Method getGeneratedKeysMethod()
getGeneratedKeysMethod
in class DBAppenderBase<ILoggingEvent>
protected java.lang.String getInsertSQL()
getInsertSQL
in class DBAppenderBase<ILoggingEvent>
protected void insertProperties(java.util.Map<java.lang.String,java.lang.String> mergedMap, java.sql.Connection connection, long eventId) throws java.sql.SQLException
java.sql.SQLException
protected void insertThrowable(IThrowableProxy tp, java.sql.Connection connection, long eventId) throws java.sql.SQLException
java.sql.SQLException