|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.apache.log.output.AbstractTarget
|
+--org.apache.log.output.db.AbstractJDBCTarget
|
+--org.apache.log.output.db.DefaultJDBCTarget
The basic DB target for configurable output formats.
| Constructor Summary | |
DefaultJDBCTarget(DataSource dataSource,
String table,
ColumnInfo[] columns)
Creation of a new JDBC logging target. |
|
| Method Summary | |
protected void |
closeConnection()
Close connection to underlying database. |
protected ColumnInfo |
getColumn(int index)
Return the column info for an supplied index. |
protected String |
getStatementSQL()
Return the SQL insert statement. |
protected String |
getTable()
Return the underlying table |
protected boolean |
isStale()
Test if the target is stale. |
protected void |
openConnection()
Open connection to underlying database. |
protected void |
output(LogEvent event)
Output a log event to DB. |
protected void |
specifyColumn(PreparedStatement statement,
int index,
LogEvent event)
Adds a single object into statement. |
| Methods inherited from class org.apache.log.output.db.AbstractJDBCTarget |
checkConnection, close, doProcessEvent, getConnection, open |
| Methods inherited from class org.apache.log.output.AbstractTarget |
error, getErrorHandler, isOpen, processEvent, setErrorHandler |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DefaultJDBCTarget(DataSource dataSource,
String table,
ColumnInfo[] columns)
dataSource - the JDBC datasourcetable - the tablecolumns - a ColumnInfo array| Method Detail |
protected void output(LogEvent event)
output in class AbstractJDBCTargetevent - the log event.protected void openConnection()
openConnection in class AbstractJDBCTargetprotected String getStatementSQL()
protected boolean isStale()
isStale in class AbstractJDBCTargetprotected void closeConnection()
closeConnection in class AbstractJDBCTarget
protected void specifyColumn(PreparedStatement statement,
int index,
LogEvent event)
throws SQLException,
IllegalStateException
statement - the prepard statementindex - the indexevent - the log event
SQLException - if an SQL related error occurs
IllegalStateException - if the supplied index is out of boundsprotected final String getTable()
protected final ColumnInfo getColumn(int index)
index - the index
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||