[logback-user] How to log FROM an appender?

TJ Rothwell tj.rothwell at gmail.com
Wed Nov 16 18:46:31 CET 2011


The danger of an appender producing messages is infinite recursion.

1) App creates message
2) Appender processes message
 a) appender forwards message (file/jms/jdbc)
 b) appender generates another message. If this message routes back to this
appender, we have infinite recursion.

If the purpose of the message is diagnostic in nature, what is wrong with
having a StatusListener to output it?

-- TJ



On Wed, Nov 16, 2011 at 11:40 AM, ralph.goers @dslextreme.com <
rgoers at apache.org> wrote:

> Rats. That should have read "they are not available to "normal" loggers".
>
> Ralph
>
>
> On Wed, Nov 16, 2011 at 9:31 AM, ralph.goers @dslextreme.com <
> rgoers at apache.org> wrote:
>
>> The call to addInfo adds the message to the Status Manager. They are
>> available to "normal" loggers. Please look at
>> http://logback.qos.ch/manual/configuration.html#viewingStatusMessages.
>>
>> Ralph
>>
>>
>> On Wed, Nov 16, 2011 at 8:27 AM, Steve Cohen <scohen at javactivity.org>wrote:
>>
>>>
>>>>
>>>>
>>> Thanks, Ceki.  I am looking into this.  I have a question, though.  If
>>> you, for example, call addInfo() from an appender, which Logger decides
>>> whether or not to log it?  The root logger?
>>>
>>> ______________________________**_________________
>>> Logback-user mailing list
>>> Logback-user at qos.ch
>>> http://mailman.qos.ch/mailman/**listinfo/logback-user<http://mailman.qos.ch/mailman/listinfo/logback-user>
>>>
>>
>>
>
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20111116/ff904efa/attachment.html>


More information about the Logback-user mailing list