[logback-user] Configuring SiftingAppender
Luciano Molinari
lucmolinari at gmail.com
Mon May 3 14:36:51 CEST 2010
Hello Ceki,
Thanks for your answer.
But in this way will logback create one FileAppender every time I write
something in the log?Can't this be a performance trouble?
On Mon, May 3, 2010 at 9:27 AM, Ceki Gülcü <ceki at qos.ch> wrote:
> Hello Luciano,
>
> You can't set the 30 minute threshold. However, you can force
> immediate removal of nested FileAppender via SiftingAppender's
> tracker. Here is the code:
>
> SiftingAppende siftingAppender = ...
> AppenderTracer tracker = siftingAppender.getAppenderTracker();
> tracker.stopAndRemoveNow(aKey);
>
> where 'aKey' is the discriminator value used for the nested FileAppender.
>
> HTH,
>
>
> On 03/05/2010 2:16 PM, Luciano Molinari wrote:
>
>> Hi guys,
>>
>> I read the SiftingAppender's documentation and saw the following line:
>> "...
>> Appenders unused for 30 minutes will be automatically closed and
>> discarded.
>> ..."
>>
>> My question is if i can confiugure this time?
>>
>> I want to use SiftingAppender to create one file per "request", but one
>> request can take some minutes to get finished and the whole system
>> writes stuff about one particular request. It's such a trace log. As I
>> can have lots of requests, i'm afraid of get a TooManyOpenFiles
>> IOException during this 30 minutes interval. Does this fear proceed?
>>
>> Thanks and sorry for the english.
>> --
>> Luciano Davoglio Molinari
>>
>>
>> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://qos.ch/mailman/listinfo/logback-user
>
--
Luciano Davoglio Molinari
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/logback-user/attachments/20100503/0cfc1275/attachment.html>
More information about the Logback-user
mailing list