Erm, yeah, that's the same thing I thought... :D I know I do it, and I guess I can bash the other developers' heads with the log4j manual until they see the light ;)
On 6/29/05, Schuweiler, Joel J. <[EMAIL PROTECTED]> wrote: > Good luck with the last part, you know, where the developer does something ;) > > -----Original Message----- > From: Javier Gonzalez [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 29, 2005 10:59 AM > To: Log4J Users List > Subject: Re: Logging the exception message but not the stack trace? > > Finally, the easiest solution for the problem was to extend the > Layout, make it tell the appender that the layout is taking care of > the Throwable, and then... don't :) > > public class NoStackTracePatternLayout extends PatternLayout { > public boolean ignoresThrowable() { > return false; > } > } > > that way the Appender doesn't forcibly append the stack trace to the > logs, thinking that the Layout will take care of it. > > It does have the caveat, though, that the developers must use > informative error messages. > > -- > Javier Gonzalez Nicolini > > --------------------------------------------------------------------- > 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] > > -- Javier Gonzalez Nicolini --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
