"Curt Arnold" <carnold@apache.org> escreveu na mensagem
news:7178CB84-543A-4166-B93C-04F8EA01006A@apache.org...
>>> 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.
Regards,
Leo.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org
|