Hi,Marcus.

The best way I found to handle it, if I understand your question correctly,
is to pass the entire exception object into the parameter, like so:

try {

  SomeOperation();

}catch(Exception e){

  log.Error(e);
}

Harry Douglass
Consumer Lending Application Development
X2-1035




                                                                           
             "Widerberg                                                    
             Marcus"                                                       
             <Marcus.Widerberg                                          To 
             @tetrapak.com>            "Log4NET User"                      
                                       <[email protected]>   
             02/01/2007 06:15                                           cc 
             AM                                                            
                                                                   Subject 
                                       Logging stack trace                 
             Please respond to                                             
              "Log4NET User"                                               
             <[EMAIL PROTECTED]                                             
             ging.apache.org>                                              
                                                                           
                                                                           




Hello everyone,

Is there a way to add a stack trace to each log event for a certain
appender layout?

I have an errorappender, and when it receives an event to log, I would
like it to log the whole stack trace as well.

This is for debug and test purposes.

/marcus



The contents of this email are the property of PNC. If it was not addressed to 
you, you have no legal right to read it. If you think you received it in error, 
please notify the sender. Do not forward or copy without permission of the 
sender. This message may contain an advertisement of a product or service and 
thus may constitute a commercial electronic mail message under US Law. PNC’s 
postal address is 249 Fifth Avenue, Pittsburgh, PA 15222. If you do not wish to 
receive any additional advertising or promotional messages from PNC at this 
e-mail address, click here to Unsubscribe. 
https://pnc.p.delivery.net/m/u/pnc/uni/p.asp By unsubscribing to this message, 
you will be unsubscribed from all advertising or promotional messages from PNC. 
Removing your e-mail address from this mailing list will not affect your 
subscription to alerts, e-newsletters or account servicing e-mails.

Reply via email to