commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: Logger and throwables
Date Mon, 24 Sep 2012 23:37:41 GMT
oops, wrong list, please ignore.

Gary

On Mon, Sep 24, 2012 at 7:37 PM, Gary Gregory <garydgregory@gmail.com>wrote:

> Hi All,
>
> Most of the time, I now do:
>
>    logger.error(throwable.toString(), throwable);
>
> I do this instead of
>
>    logger.error(throwable.getMessage(), throwable)
>
> in case the message is null.
>
> But I'd rather simply say:
>
>    logger.error(throwable)
>
> Same idea for other levels.
>
> Thoughts?
>
> Gary
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
> Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message