logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <nore...@qos.ch>
Subject PreparedStatementAppender vs. JDBCAppenderPlus
Date Mon, 26 Apr 2004 21:02:59 GMT

After studying both PreparedStatementAppender vs. JDBCAppenderPlus, I would 
like to build on mostly PreparedStatementAppender for the DBAppender to be 
included in the next version of log4j.

My preference goes to PreparedStatementAppender over JDBCAppenderPlus 
because of its simplicity although it maybe purportedly less flexible.

I think PreparedStatementAppender could be further simplified if we assumed 
fixed table columns. Is there any real advantage in allowing variation in 
the column names?  We don't allow any flexibility when using XMLLayout, why 
should we allow variation in the column names when writing to a DB? 
Flexibility without a real-world use case does not seem wise to me... Is 
there a use case where flexibility for the table columns would make sense?

By the way, when inserting events into the database, we can ensure that the 
primary key for each row is sequential. When reading from the database, a 
db receiver could insert the primary key into the properties under the key 
'pkey'. This should allow us to efficiently compare events coming from a db.
(I am assuming that an event will be inserted into a single table. Things 
get more complicated if one starts playing with one-to-many relationship 
between an event and its MDC and/or properties map.)

Ceki Gülcü

      For log4j documentation consider "The complete log4j manual"
      ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp  

To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org

View raw message