[logback-user] DBNameResolver

Merritt H Derr MDerr at nycm.com
Fri Jan 28 15:23:23 CET 2011


Roy:

I realize now that I never paid attention to this because in my use of the 
database logging, I had to create my own DBAppender class and it overrides 
the append method in DBAppenderBase and so doesn't rely on the EVENT_ID 
field name as used in the DBAppenderBase append method. I make all the 
calls to build the various SQL statements in the start method of my 
appender and then subsequently call the DBAppenderBase start method.

For the standard logback code it looks like you are correct that the user 
is stuck with the EVENT_ID name in their event table.

Merritt



From:   Roy Cronise <sweep at ccyor.com>
To:     logback-user at qos.ch
Date:   01/27/2011 08:14 PM
Subject:        [logback-user] DBNameResolver
Sent by:        logback-user-bounces at qos.ch



Merritt:

DBAppenderBase isn't in the loop, but has the event id column
name(EVENT_ID) coded into it and doesn't use the DBNameResolver.  The
event id column name is needed when they create the prepared statement
in DBAppenderBase and the database supports getGeneratedKeys.  Maybe
adding an abstract "getEventIdCol" in DBAppenderBase and implementing
it in DBAppender(which has the DBNameResolver).

Roy
_______________________________________________
Logback-user mailing list
Logback-user at qos.ch
http://qos.ch/mailman/listinfo/logback-user


Join us on Facebook at www.facebook.com/NYCMInsurance.


***CONFIDENTIALITY NOTICE***
This email and any attachments to it are confidential and intended solely 
for the individual or entity to whom it is addressed. Any unauthorized 
review, use, disclosure or distribution is prohibited. If you have 
received this email in error, please contact the sender by reply email and 
destroy all copies of the original message. 




More information about the Logback-user mailing list