logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <ggreg...@apache.org>
Subject Re: Lack of Category.error(Throwable t)
Date Thu, 15 Mar 2012 15:07:46 GMT
On Thu, Mar 15, 2012 at 10:55 AM, Christian Grobmeier
<grobmeier@gmail.com>wrote:

> If I understand you right, your suggestion is to add:
> error(Throwable t)
> I don't see a reason why this cannot happen...
> We just should not remove methods to keep bc, but adding should not be a
> problem
>

For 1.4? :)

Gary


>
> Cheers!
> Christian
>
> On Wed, Mar 14, 2012 at 8:09 PM, Rich Midwinter
> <rich.midwinter@gmail.com> wrote:
> > Hi
> >
> >
> > I note that the following methods exist:
> >
> > error(Object message)
> >
> > error(Object message, Throwable t)
> >
> >
> > But this one does not:
> >
> > error(Throwable t)
> >
> >
> > Although it's absence is implied by the following JavaDoc on the first
> > method I referred to:
> >
> > WARNING Note that passing a Throwable to this method will print the name
> of
> > the Throwable but no stack trace. To print a stack trace use
> > the error(Object, Throwable) form instead.
> >
> >
> > Is there a reason I've overlooked to avoid adding a method that just
> takes a
> > throwable? It's quite frustrating to find out in production that
> someone's
> > overlooked this and we've lost a stack trace. The fix often just passes
> in
> > t.getMessage() anyway.
> >
> >
> > Thanks
> >
> > Rich
> >
> >
>
>
>
> --
> http://www.grobmeier.de
> https://www.timeandbill.de
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: http://bit.ly/ECvg0
Spring Batch in Action: http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory <http://twitter.com/GaryGregory>

Mime
View raw message