[logback-user] Buffered Appender?

Eric Faden eric at techeminence.com
Sat Aug 16 17:43:13 CEST 2008


Cool thanks.  I got the idea then.  Is there any way to do something 
like that in the filter level or before it got to the appender?  Also 
how inefficient would it be to create the LoggingEvent?  My idea would 
be to only put this appender on certain classes if for instance there is 
an exception we are trying to track down.  It seems that based on the 
code creating the LoggingEvent isn't very expensive since the string 
isn't built until it is actually appended.  So setting the Debug level 
higher and having the Appender handle it wouldn't incur that much of a 
performance penalty.  Right?

-Eric

Ceki Gulcu wrote:
> Eric Faden wrote:
>   
>> Right, but in order to do that I would have to have the level for that 
>> logger set to debug and then let the appender do the filtering itself 
>> correct?  
>>     
>
> Yes.
>
>   
>> For instance suppose the logger is set to ERROR and the marker 
>> is sent in a DEBUG.  The appender would never get the marker correct?
>>     
>
> Yes. The appender would not see the LoggingEvent instance which would not be 
> created. It's the LoggingEvent instances that contain markers.
>
>   
>> -Eric
>>     



More information about the Logback-user mailing list