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 Shay Mandel <sh...@mercury.co.il> on 2001/12/09 07:43:03 UTC

methodology for using Log4j

Hi,

Is there some methodology of using log4j for providing errors/exceptions? I
want to log my exceptions as they occur, but I want the stack trace only
once in the log file. I thought of logging it only in the first place I
catch the exception (before throwing it upwards). The problem is, what if
the log level in this place is too low (like warn) and in the upper level it
is higher (like fatal). In this case, if the log level is set higher than
the one I logged in the first place I catched the exception (e.g. set to
fatal or error) then I will never see the stack trace. Is there any
methodology for doing this?

TIA.

Shay Mandel.


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