In the javadocs for org.apache.log4j.Category
warn(Object message, Throwable t)
Log a message with the WARN priority including the stack trace of the
Throwable t passed as parameter.
there are of course version of this method for error, info and debug.
-Peace
Dave
> -----Original Message-----
> From: Loda, Joe [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 26, 2001 2:01 PM
> To: '[EMAIL PROTECTED]'
> Subject: Logging stack trace
>
>
> Hi,
>
> How can I redirect the stack trace from an exception:
>
> try
> {
> ... stuff ...
> }
> catch ( Exception e )
> {
> e.printStackTrace(); // divert to log4j
> }
>
> Thanks in advance,
> Joe
>
> ---
> Joe Loda, mpct Solutions Corporation, Chicago
> [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> 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]