DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27135>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27135 [logging] SimpleLog log method should defer writing for better reuse! ------- Additional Comments From [EMAIL PROTECTED] 2004-02-29 00:37 ------- I'm in favour of Aaron's proposal to add a doWrite(StringBuffer s) method. This extra virtual method call occurs only after it is determined that the message *will* be output. Performance is critical when determining *if* a message will be logged, but given that we have now committed to doing IO (which is always slow), I don't see an extra virtual method call being significant at that point. Robert, I think the Log interface is sufficiently complex to make reuse-by-delegation a pain; inheritance seems cleaner to me in this case. And it seems a quite common use-case too; using all the standard SimpleLog functionality but directing the output to some custom destination. I also think the doWrite method should take StringBuffer, not String, as a parameter, just in case the doWrite method wants to tweak the output string some more. Yes this commits the log() method to using StringBuffers forever more, but I can't see why it would ever want to use anything else. Still, this could be debated... --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
