logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leo Lima" <onl...@l3o.net>
Subject Re: Enhanced FileAppender
Date Thu, 05 Oct 2006 12:45:35 GMT

"Curt Arnold" <carnold@apache.org> escreveu na mensagem 
>>> Opening or reopening a log file will append to the file.
>> That should be the case only if the log file was closed due timeout  or 
>> max
>> open limit reached; because that would then mimic the behavior of
>> FileAppender; the Append parameter being false, the file is  overwritten 
>> on
>> first open...
> If there is an append attribute, then it would need to follow the  pattern 
> that you suggest.  However, I'm not sure that their is a  strong enough 
> use case to support an "append" attribute.  Obviously,  if you extend from 
> FileAppender you would have one and would have to  figure out what it 
> means.  Supporting the "append" semantics that you  described would, like 
> header and footer, require that you capture the  name of every file ever 
> opened during the application lifetime.

Well, in recurrent scheduling servers that open a log file per schedule, 
that would be totally necessary. I, for example, must use something that has 
append in it...

> Headers and Footers are part of the layout, so you could not prevent  the 
> user from matching a MultiFileAppender with a layout with a  header or 
> footer.  However, explicitly saying that you ignore them  would be an 
> option, at least at first.

Let's say they're ignored, then.

> At least not use a thread to manage it by default.  Maybe an optional 
> parameter to specify a timer interval or an public method that an 
> interested user could add to a scheduler.

Fine by me. But I think the default should be a pool and the checks should 
be done when creating a new file descriptor...

I'll try and extend the KeyFileAppender to include the pool I mentioned and 
see how it goes, as a side personal project. I really need a quick solution 
for max open files problem.


To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org

View raw message