org.apache.log.output.db
Class NormalizedJDBCTarget
- Closeable, ErrorAware, LogTarget
public class NormalizedJDBCTarget
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
protected int | getID(String tableName, HashMap idMap, String instance)
|
protected void | specifyColumn(PreparedStatement statement, int index, LogEvent event)- Adds a single object into statement.
|
NormalizedJDBCTarget
public NormalizedJDBCTarget(DataSource dataSource,
String table,
ColumnInfo[] columns) Creation of a new JDBC logging target.
dataSource - the JDBC datasourcetable - the tablecolumns - a ColumnInfo array
getID
protected int getID(String tableName,
HashMap idMap,
String instance)
throws SQLException
specifyColumn
protected void specifyColumn(PreparedStatement statement,
int index,
LogEvent event)
throws SQLException Adds a single object into statement.
- specifyColumn in interface DefaultJDBCTarget