Thanks Ceki for the tips. The reason I am keen to do this is that Chainsaw v2 now uses a Pattern Layout to render the the currently Selected event in both a Detail panel, and via Tooltips. I've got a Pattern Editor dialog setup so the user can edit the patterns.
The previous version of Chainsaw formatted the event by hand, and if the event contained Throwable information, it printed the stack trace inside the panel. I've realised that since the move to re-use all the Log4j layout infrastructure, that the Stack trace is not viewable inside the detail panel. So perhaps it's not generally useful, but it seems funny not to be able to out this information as an option for PatternLayout. Paul -----Original Message----- From: Ceki Gülcü To: Log4J Developers List Sent: 9/11/03 6:16 PM Subject: Re: Proposal: Modify PatternLayout to support ThrowableInformation output 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]