If you are going to add a new conversion character than make it a conversion word. PatternLayout now supports conversion words.
More importantly, if the layout handles exceptions, then it should tell so to the containing appender. Otherwise, the layout would print the exception but so would the appender. The layout can instruct the containing appender not to reprint the exception by returning false from within its ignoresThrowable method. See Layout.ignoresThrowable.
The trouble is that up until now there was no need to have layotus handle exceptions and PatternLayout always returns true. This can be fixed rather quickly. We could have PatternLayout keep track of the PattenConverters it uses and whenever PatternLayout encounters a PattenConverter handling exceptions it would set the return value of ignoresThrable to false.
Anyway, do you think adding %T to PatternLayout would be useful?
At 10:33 AM 9/11/2003 +1000, you wrote:
Can anyone think of a reason why we shouldn't have the ThrowableInformation available for output via PatternLayout?
I would propose that %T is used for this. I am happy to implement this and provide test cases if agreeable.
cheers,
Paul Smith
-- Ceki Gülcü
For log4j documentation consider "The complete log4j manual" ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp
See you in November at ApacheCon US 2003 in Las Vegas. http://apachecon.com/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]