You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by "Hosahalli, Raghu" <Ho...@SUMMITSITE.COM> on 2001/12/12 17:47:54 UTC

Loggin exceptions

Hi,

I am facing a basic problem related to log4j.
I want to log exception stack traces which are useful for debugging.
In Throwable class
void printStackTrace() - prints into "System.err"
The remaining two prints into "PrintStream" or "PrintWriter".

how to use these methods to log using log4j.

Thanks in advance

Regds
Raghu Hosahalli

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Loggin exceptions

Posted by doug b <um...@yahoo.com>.
the log4j methods debug, warn, error, etc.  have 2
signatures.  one takes just an Object, but one takes
both an Object and a Throwable.  if you call the one
that takes a Throwable, a stack trace will be logged.

--- "Hosahalli, Raghu"
<Ho...@SUMMITSITE.COM> wrote:
> Hi,
> 
> I am facing a basic problem related to log4j.
> I want to log exception stack traces which are
> useful for debugging.
> In Throwable class
> void printStackTrace() - prints into "System.err"
> The remaining two prints into "PrintStream" or
> "PrintWriter".
> 
> how to use these methods to log using log4j.
> 
> Thanks in advance
> 
> Regds
> Raghu Hosahalli
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>