Package ch.qos.logback.access.db
Class DBAppender
- java.lang.Object
-
- ch.qos.logback.core.spi.ContextAwareBase
-
- ch.qos.logback.core.UnsynchronizedAppenderBase<E>
-
- ch.qos.logback.core.db.DBAppenderBase<IAccessEvent>
-
- ch.qos.logback.access.db.DBAppender
-
- All Implemented Interfaces:
Appender<IAccessEvent>
,ContextAware
,FilterAttachable<IAccessEvent>
,LifeCycle
public class DBAppender extends DBAppenderBase<IAccessEvent>
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
Fields Modifier and Type Field Description protected static java.lang.reflect.Method
GET_GENERATED_KEYS_METHOD
protected java.lang.String
insertHeaderSQL
protected static java.lang.String
insertSQL
-
Fields inherited from class ch.qos.logback.core.db.DBAppenderBase
cnxSupportsBatchUpdates, cnxSupportsGetGeneratedKeys, connectionSource, sqlDialect
-
Fields inherited from class ch.qos.logback.core.UnsynchronizedAppenderBase
name, started
-
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
-
-
Constructor Summary
Constructors Constructor Description DBAppender()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.reflect.Method
getGeneratedKeysMethod()
protected java.lang.String
getInsertSQL()
protected void
secondarySubAppend(IAccessEvent event, java.sql.Connection connection, long eventId)
void
setInsertHeaders(boolean insertHeaders)
protected void
subAppend(IAccessEvent event, java.sql.Connection connection, java.sql.PreparedStatement insertStatement)
-
Methods inherited from class ch.qos.logback.core.db.DBAppenderBase
append, getConnectionSource, selectEventId, setConnectionSource, start, stop
-
Methods inherited from class ch.qos.logback.core.UnsynchronizedAppenderBase
addFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, toString
-
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ch.qos.logback.core.spi.ContextAware
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
-
-
-
-
Field Detail
-
insertSQL
protected static final java.lang.String insertSQL
-
insertHeaderSQL
protected final java.lang.String insertHeaderSQL
- See Also:
- Constant Field Values
-
GET_GENERATED_KEYS_METHOD
protected static final java.lang.reflect.Method GET_GENERATED_KEYS_METHOD
-
-
Method Detail
-
subAppend
protected void subAppend(IAccessEvent event, java.sql.Connection connection, java.sql.PreparedStatement insertStatement) throws java.lang.Throwable
- Specified by:
subAppend
in classDBAppenderBase<IAccessEvent>
- Throws:
java.lang.Throwable
-
secondarySubAppend
protected void secondarySubAppend(IAccessEvent event, java.sql.Connection connection, long eventId) throws java.lang.Throwable
- Specified by:
secondarySubAppend
in classDBAppenderBase<IAccessEvent>
- Throws:
java.lang.Throwable
-
getGeneratedKeysMethod
protected java.lang.reflect.Method getGeneratedKeysMethod()
- Specified by:
getGeneratedKeysMethod
in classDBAppenderBase<IAccessEvent>
-
getInsertSQL
protected java.lang.String getInsertSQL()
- Specified by:
getInsertSQL
in classDBAppenderBase<IAccessEvent>
-
setInsertHeaders
public void setInsertHeaders(boolean insertHeaders)
-
-