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

ralph.goers @dslextreme.com rgoers at apache.org
Wed Nov 16 18:55:34 CET 2011


Actually, recursion isn't really a problem and is pretty easy to handle.
 The problem is that you are in the middle of configuring your logging
system and trying to log, so what is supposed to happen to the log event?
The components to process it aren't fully in place yet.  Ceki handles that
by detecting the attempt to create the logger and generating a nastygram.

Ralph

On Wed, Nov 16, 2011 at 9:46 AM, TJ Rothwell <tj.rothwell at gmail.com> wrote:

> 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
>>
>
>
> _______________________________________________
> 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/ac483830/attachment.html>


More information about the Logback-user mailing list