On Jun 11, 2008, at 12:52 AM, Julius Davies wrote:
On Tue, Jun 10, 2008 at 10:41 PM, Lilianne E. Blaze
<[EMAIL PROTECTED]> wrote:
Hello,
One more thing - why should "A Log Rotation Best Practice That Is
Currently
Not Possible" be impossible?
Either
1) Implement it extending rolling file appender. Should be
reasonably easy.
Disadvantage - tied to a speficic api.
Yes!!!! And now I'm waiting for your patch..... :-p
2) Start a daemon thread which logs the required info immediately,
and then
once every midnight (or whenever your logs roll). Advantage -
compatible
with everything (assuming it's using JCL or similar wrapper),
disadvantage -
its output will probably end up not on the top of the file, but
somewhere in
1st minute.
It's quite hard to hit every "active" log file using approach #2.
Log4J might have created hundreds of active logs in parallel, all
getting rotated on different frequencies.
Rolling (that is closing, renaming and reopening a file) is
problematic particularly in the all too common case of multiple
instances configured to use the same files. Better to write the files
with the final name from the beginning. I am hoping that when we
finish MultiFileAppender, it will displace the RFA's.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]