[logback-dev] [JIRA] Commented: (LBCORE-159) AppenderBase and UnsynchronizedAppenderBsae do not allow exceptions to percolate to the application

Ceki Gulcu (JIRA) noreply-jira at qos.ch
Wed Oct 13 11:18:51 CEST 2010

    [ http://jira.qos.ch/browse/LBCORE-159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11839#action_11839 ] 

Ceki Gulcu commented on LBCORE-159:

Let us keep in mind that the appendLoopOnAppenders in Logger assumes that appenders do *not* throw exceptions. Consider a set up where a logger, say L, has appenders A and B attached to it. If the present patch is applied, how would we deal with the situation where appender A throws an exception? Should we still try to invoke the doAppend method on B? If we decide to invoke B and it also throws an exception, should we percolate the exception generated by A or that generated by B?

I would like to see an attempt to answer these questions before the patch is applied.

> AppenderBase and UnsynchronizedAppenderBsae do not allow exceptions to percolate to the application
> ---------------------------------------------------------------------------------------------------
>                 Key: LBCORE-159
>                 URL: http://jira.qos.ch/browse/LBCORE-159
>             Project: logback-core
>          Issue Type: Improvement
>          Components: Appender
>    Affects Versions: 0.9.24
>         Environment: All
>            Reporter: Ralph Goers
>            Assignee: Ceki Gulcu
>         Attachments: exceptionPatch.txt
> When logging some events the application needs to be informed that the publishing of the event failed. Currently, AppenderBase and UnsynchronizedAppenderBase catch and handle all exceptions making it impossible to use any of the out-of-the box Logback appenders in these situations. This is particularly important when performing auditing and sending the events to a database, JMS queue, socket, etc. as the application would want to fail the current operation if it cannot be audited. 

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the logback-dev mailing list