Package org.apache.log.output.db
Class NormalizedJDBCTarget
java.lang.Object
org.apache.log.output.AbstractTarget
org.apache.log.output.db.AbstractJDBCTarget
org.apache.log.output.db.DefaultJDBCTarget
org.apache.log.output.db.NormalizedJDBCTarget
- All Implemented Interfaces:
ErrorAware,LogTarget,Closeable
JDBC target that writes to normalized tables.
This reduces overhead and cost of querying/storing logs.
Parts based on JDBC logger from prottomatter by Nate Sammons
- Author:
- Peter Donald
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNormalizedJDBCTarget(DataSource dataSource, String table, ColumnInfo[] columns) -
Method Summary
Modifier and TypeMethodDescriptionprotected intprotected voidspecifyColumn(PreparedStatement statement, int index, LogEvent event) Adds a single object into statement.Methods inherited from class org.apache.log.output.db.DefaultJDBCTarget
closeConnection, getColumn, getStatementSQL, getTable, isStale, openConnection, outputMethods inherited from class org.apache.log.output.db.AbstractJDBCTarget
checkConnection, close, doProcessEvent, getConnection, openMethods inherited from class org.apache.log.output.AbstractTarget
getErrorHandler, isOpen, processEvent, setErrorHandler
-
Field Details
-
m_categoryIDs
-
m_priorityIDs
-
-
Constructor Details
-
NormalizedJDBCTarget
-
-
Method Details
-
specifyColumn
protected void specifyColumn(PreparedStatement statement, int index, LogEvent event) throws SQLException Adds a single object into statement.- Overrides:
specifyColumnin classDefaultJDBCTarget- Parameters:
statement- the prepard statementindex- the indexevent- the log event- Throws:
SQLException- if an SQL related error occurs
-
getID
- Throws:
SQLException
-