Hi,

I have downloaded Log4J 1.2.6 yesterday and have made a simple
BufferAppender. This is storing log events in a cyclic buffer and overwrites
the oldest log event when a new one is appended. The whole buffer and the
new message are forwarded to a subappender if the new log event has got a
priority that is high enough.

This means one won't get all the debug and info messages in the log (so the
log would keep small and clean) unless a log event with a priority that is
high enough (e.g. ERROR) occurs. Then the log will contain not only the
error itself but its history too.

The class has got only one small error:
If the size is decreased while the buffer is full the oldest messages remain
in the buffer instead of the newest ones. This is because
helper.CyclicBuffer is used internally.
I would be willing to change this if nobody objects. What is CyclicBuffer
used else for?

I would donate the BufferAppender to the project if you are interested.

Regards,

Ole

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to