org.apache.log.output.db

Class NormalizedJDBCTarget

public class NormalizedJDBCTarget extends DefaultJDBCTarget

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
HashMapm_categoryIDs
HashMapm_priorityIDs
Constructor Summary
NormalizedJDBCTarget(DataSource dataSource, String table, ColumnInfo[] columns)
Method Summary
protected intgetID(String tableName, HashMap idMap, String instance)
protected voidspecifyColumn(PreparedStatement statement, int index, LogEvent event)
Adds a single object into statement.

Field Detail

m_categoryIDs

private HashMap m_categoryIDs

m_priorityIDs

private HashMap m_priorityIDs

Constructor Detail

NormalizedJDBCTarget

public NormalizedJDBCTarget(DataSource dataSource, String table, ColumnInfo[] columns)

Method Detail

getID

protected int getID(String tableName, HashMap idMap, String instance)

specifyColumn

protected void specifyColumn(PreparedStatement statement, int index, LogEvent event)
Adds a single object into statement.