[logback-user] Use of Dbappender for logging application events
pradnya.gawade7 at gmail.com
Thu Sep 9 18:00:23 CEST 2010
I am a newbie to logback and trying to use Dbappender to log application
events information into the database. As I did not get to see any examples
of how Dbappender can be used for this purpose, I just want to confirm if I
am using it in a right way or not.
Every time an event message will be logged into logging_event table, the
related event details will be stored in logging_event_property table as
key-value pairs. These two can be associated with event_id in both the
tables. As the contents of MDC are stored into logging_event_property
table, I have to put my event details in the MDC context before I log the
event message and remove it from the MDC context after the event message
logging is complete. I am not sure if it is the right use of MDC context.
Also the properties stored in logback.xml (e.g I store directory for log
files) are inserted into logging_event_property table every time I log any
statement. I saw one issue posted related to this in the logback issue
tracking system and it seems I cannot avoid storage of these properties in
database every time. Unnecessary lot of duplicate rows get inserted with
Please suggest if I can make any improvements. Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Logback-user