[logback-user] log.callAppenders and DBAppender

Jon Anderson jonanderson.mn at gmail.com
Tue Oct 5 19:10:41 CEST 2010


Actually, I found the issue.  http://jira.qos.ch/browse/LBCLASSIC-157

<http://jira.qos.ch/browse/LBCLASSIC-157>As a work around, I simply
subclasses JMSTopicAppender with my own class:

public class OTJMSTopicAppender extends JMSTopicAppender
{

    @Override
    public void append(ILoggingEvent event) {
        event.getCallerData();
        super.append(event);
    }
}

That fixes the issue.
<http://jira.qos.ch/browse/LBCLASSIC-157>

On Tue, Oct 5, 2010 at 10:21 AM, Jon Anderson <jonanderson.mn at gmail.com>wrote:

> I'm using the JMSTopicAppender to log events from numerous applications and
> a MDB that consumes those messages and reissues the log statements just like
> the example JSMTopicSink application.
>
> The MDB side of things has a rolling file appender configured, as well as a
> DBAppender.  When I issue standard log statements within the MDB, the log
> statements are both appearing in the DB tables and in the file.  However,
> the log statements issued by the log.callAppenders() (IE, the event from the
> JMS message) are only appearing in the file, not the DB tables.  In fact,
> when I trace the queries being executed, a start and stop transaction
> statement is being issued for each log event, but no insert is generated.
>
> I've assumed I have everything configured correctly, as log.info("Message")
> works, but log.callAppenders(event) doesn't.   Is there some piece I am
> missing?
>
> Thanks,
> Jon
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/logback-user/attachments/20101005/4e7c4e1b/attachment-0001.html>


More information about the Logback-user mailing list