logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dharanendra S. Pandit" <Dharanend...@netscape.net>
Subject Doubt
Date Fri, 29 Mar 2002 07:13:23 GMT
Hi *.*,

I'm quite new to log4j.  I'm facing with a problem.  I hope someone 
within the forum might have a solution for this.  The problem is:

When an runtime exception is raised I need to log it into a file, which 
I have already configured.  The logging should be something equivalent 
to e.printStackTrace( ), where e is of type java.lang.Exception.  If  I 
pass object e, to org.apache.log4j.Category.fatal( e ), it looks like it 
is logging e.toString( ), which I do not want.

Is there a way where I could log something equivalent to what 
e.printStackTrace( ) does, into my log file?   Any better ideas of how 
to log Runtime Exceptions would be highly appreciated.

Thanks in advance.


To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>

View raw message