logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Young <lyo...@dalmatian.com>
Subject SMTPAppender logging stacktrace
Date Thu, 03 Jun 2004 19:08:15 GMT
Hello,

         I've been struggling with SMTPAppender using the 
PatternLayout.  No matter what I set the pattern to, it kept sending out 
the entire exception stack trace.    I thought it was appearing because of 
the %m so I thought I was doing the format specifiers incorrectly 
(%-1.100m).  Come to find out that the SMTPAppender class is taking it upon 
itself to append the stack trace to the email message.  Actually, it is 
only doing this if the Layout class says that it "ignores the throwable", 
which PatternLayout does.

         So, is my solution to this problem to write a new Layout class 
that claims that is doesn't ignore the throwable (which it actually 
will!)?  I just want to make sure that this is the intended path to go down 
to hide the stack trace from the logger output.

         BTW, before anyone thinks I'm throwing away the stack trace, I'm 
not.  The stack trace is being output to the physical log file.  I just 
don't want to include it in the email message I'm sending, and I REALLY 
don't want to include it in the message I'm sending to my pager!!

         Any thoughts or suggestions are appreciated.

--- regards ---
Larry



--------------------------
Larry Young
The Dalmatian Group
www.dalmatian.com 



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


Mime
View raw message