
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

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

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@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@qos.ch http://qos.ch/mailman/listinfo/logback-user
-- Luciano Davoglio Molinari

You can invoke 'tracker.stopAndRemoveNow(aKey)' at the very end of each request. On 03/05/2010 2:36 PM, Luciano Molinari wrote:
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?

hum..I don't know if that'll be possible, i need to think about it, because a request can last for 1 hour and stays some minutes without receiving no log. Is there a special reason for the 30 minute threshold can't be configurable? Thanks again On Mon, May 3, 2010 at 9:59 AM, Ceki Gülcü <ceki@qos.ch> wrote:
You can invoke 'tracker.stopAndRemoveNow(aKey)' at the very end of each request.
On 03/05/2010 2:36 PM, Luciano Molinari wrote:
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?
_______________________________________________ Logback-user mailing list Logback-user@qos.ch http://qos.ch/mailman/listinfo/logback-user
-- Luciano Davoglio Molinari
participants (2)
-
Ceki Gülcü
-
Luciano Molinari