Package org.apache.log4j.receivers.db
Class DBReceiverJob
- java.lang.Object
-
- org.apache.log4j.component.spi.ComponentBase
-
- org.apache.log4j.receivers.db.DBReceiverJob
-
class DBReceiverJob extends ComponentBase implements Job
Actual retrieval of data is made by the instance of DBReceiverJob associated with DBReceiver.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) longlastId(package private) DBReceiverparentDBReceiver(package private) java.lang.StringsqlException(package private) java.lang.StringsqlProperties(package private) java.lang.StringsqlSelect-
Fields inherited from class org.apache.log4j.component.spi.ComponentBase
repository
-
-
Constructor Summary
Constructors Constructor Description DBReceiverJob(DBReceiver parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidcloseConnection(java.sql.Connection connection)voidexecute()Execute job.(package private) org.apache.log4j.spi.ThrowableInformationgetException(java.sql.Connection connection, long id)Retrieve the exception string representation from the logging_event_exception table.(package private) voidgetProperties(java.sql.Connection connection, long id, org.apache.log4j.spi.LoggingEvent event)Retrieve the event properties from the logging_event_property table.-
Methods inherited from class org.apache.log4j.component.spi.ComponentBase
getLogger, getLoggerRepository, getNonFloodingLogger, resetErrorCount, setLoggerRepository
-
-
-
-
Field Detail
-
sqlException
java.lang.String sqlException
-
sqlProperties
java.lang.String sqlProperties
-
sqlSelect
java.lang.String sqlSelect
-
lastId
long lastId
-
parentDBReceiver
DBReceiver parentDBReceiver
-
-
Constructor Detail
-
DBReceiverJob
DBReceiverJob(DBReceiver parent)
-
-
Method Detail
-
execute
public void execute()
Description copied from interface:JobExecute job.
-
closeConnection
void closeConnection(java.sql.Connection connection)
-
getProperties
void getProperties(java.sql.Connection connection, long id, org.apache.log4j.spi.LoggingEvent event) throws java.sql.SQLExceptionRetrieve the event properties from the logging_event_property table.- Parameters:
connection-id-event-- Throws:
java.sql.SQLException
-
getException
org.apache.log4j.spi.ThrowableInformation getException(java.sql.Connection connection, long id) throws java.sql.SQLExceptionRetrieve the exception string representation from the logging_event_exception table.- Parameters:
connection-id-- Throws:
java.sql.SQLException
-
-