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 Andrew Premdas <An...@teleca.com> on 2001/09/05 14:03:18 UTC

Logging Exceptions

First post ...

Currently there are two ways to log throwables

cat.xxx(t)
and cat.xxx(message,t)

the first just displays the exception message and the second displays the
stack trace. It would be preferable if this was configurable, so you could
specify in the config file whether the stack trace should be logged. Then
you wouldn't have to make the choice when coding.





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


Re: Logging Exceptions

Posted by Don Taylor <do...@yahoo.com>.
I'm afraid you'd still have to make the choice in coding simply because
you may not want to log some exceptions, but may want to log others. I
could see your point though if you were advocating configuring the
logging of exceptions on a class-by-class bases.

For example you may want to enable logging for java.sql.SQLException,
but disable it for java.lang.ClassCastException. Is this what you had
in mind?

-- Don

--- Andrew Premdas <An...@teleca.com> wrote:
> First post ...
> 
> Currently there are two ways to log throwables
> 
> cat.xxx(t)
> and cat.xxx(message,t)
> 
> the first just displays the exception message and the second displays
> the
> stack trace. It would be preferable if this was configurable, so you
> could
> specify in the config file whether the stack trace should be logged.
> Then
> you wouldn't have to make the choice when coding.
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
> 


__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

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