Package ch.qos.logback.access.db
Class DBAppender
java.lang.Object
- All Implemented Interfaces:
Appender<IAccessEvent>,ContextAware,FilterAttachable<IAccessEvent>,LifeCycle
The DBAppender inserts access events into three database tables in a format
independent of the Java programming language.
For more information about this appender, please refer to the online manual at
http://logback.qos.ch/manual/appenders.html#AccessDBAppender
- Author:
- Ceki Gülcü, Ray DeCampo, Sébastien Pennec
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static Methodprotected Stringprotected static StringFields inherited from class ch.qos.logback.core.db.DBAppenderBase
cnxSupportsBatchUpdates, cnxSupportsGetGeneratedKeys, connectionSource, sqlDialectFields inherited from class ch.qos.logback.core.UnsynchronizedAppenderBase
name, startedFields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Methodprotected Stringprotected voidsecondarySubAppend(IAccessEvent event, Connection connection, long eventId)voidsetInsertHeaders(boolean insertHeaders)protected voidsubAppend(IAccessEvent event, Connection connection, PreparedStatement insertStatement)Methods inherited from class ch.qos.logback.core.db.DBAppenderBase
append, getConnectionSource, selectEventId, setConnectionSource, start, stopMethods inherited from class ch.qos.logback.core.UnsynchronizedAppenderBase
addFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, toStringMethods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ch.qos.logback.core.spi.ContextAware
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
-
Field Details
-
insertSQL
-
insertHeaderSQL
- See Also:
- Constant Field Values
-
GET_GENERATED_KEYS_METHOD
-
-
Constructor Details
-
DBAppender
public DBAppender()
-
-
Method Details
-
subAppend
protected void subAppend(IAccessEvent event, Connection connection, PreparedStatement insertStatement) throws Throwable- Specified by:
subAppendin classDBAppenderBase<IAccessEvent>- Throws:
Throwable
-
secondarySubAppend
protected void secondarySubAppend(IAccessEvent event, Connection connection, long eventId) throws Throwable- Specified by:
secondarySubAppendin classDBAppenderBase<IAccessEvent>- Throws:
Throwable
-
getGeneratedKeysMethod
- Specified by:
getGeneratedKeysMethodin classDBAppenderBase<IAccessEvent>
-
getInsertSQL
- Specified by:
getInsertSQLin classDBAppenderBase<IAccessEvent>
-
setInsertHeaders
public void setInsertHeaders(boolean insertHeaders)
-