logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 28647] - Add "Flush on Level" capability to FileAppender
Date Thu, 06 May 2004 02:19:35 GMT
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 paul.smith@lawlex.com.au  2004-05-06 02:19 -------
This is where having Appender being an interface would be ideal, because then 
one could 'decorate' one appender with another object to provide support code 
such as a flushing function.  Sort of like how the InputStream stuff works.

Lets assume Appender is an interface.  One could then do something like this in 
java code.  Configuration code of course might be more complex to achieve this, 
but certainly possible:

 Appender a = new FlushingAppender(new FileAppender(.....));

In the above example the FlushingAppender implements the Appender interface, 
but for the most part delegates to the internal (file)appender, except for the 
actual append methods where it might buffer events based on some strategy of 
the implementors choosing.  That way we could mix and match strategies.

This is how AsyncAppender kinda works, but I think having Appender as an 
interface is neater.  Large change though.

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


Mime
View raw message