logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Lipofsky" <dan...@nuserve.com>
Subject Re: logging stack trace
Date Tue, 19 Feb 2002 17:31:20 GMT
> Very often, it's useful to have with a log message also the stacktrace,
> For that purpose, I used to do something like:
>       try { throw new SomeException(); } catch(Exception e) {
> category.debug("blabla",e); }
> Is there anything simpler I could do without the need of an import ....
> (a class) ???

There is no need to use try/catch, you can just do
    cat.debug("message", new Exception());

- Dan



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


Mime
View raw message