DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=28647>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=28647 Add "Flush on Level" capability to FileAppender ------- Additional Comments From [EMAIL PROTECTED] 2004-05-06 04:32 ------- Yup, this is where the (smarter) FlushingWriterAppender would not actually buffer any events, just write them to the wrapped WriterAppender and periodically call writerAppender.flush() as it deems appropriate. So via the decorator approach, you could have a generic flushing appender (akin really to the Async appender), and one optimised to dealing with WriterAppenders. With the decorator approache you could then do something like: Appender a = new FlushingAppender(new FlushingWriterAppender(new WriterAppender (...), 50), 500); Lets say that in this example: * FlushingAppender: 500 = # ms to buffer events before flushing to it's internal appender (FlushingWriterAppender) * FlushingWriterAppender: 50= # of event objects to write before calling writerAppender.flush(). Having said all of this though, one does need to think about the risks of some events not getting written. While you may have a JDK hook to listen for a shutdown, some applications won't always exit quite so gracefully. And this is usually when you MOST want to know what was going on...... --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
