Robert Elliot skrev:
Just curious about this - I often find myself catching an exception and not really having anything to say about it other than that I want to log the exception. So I end up calling log.error(ex.getMessage(), ex) - which seems a bit redundant as I'll get the message out anyway.
If you don't have anything to say, then why not just use

   log.error("", ex)

?

In my experience though there is usually always SOME information to add which will help the person assigned to fix it. Personally I try to put information so the person given only the stack trace will not have to open the source to look at it. I have been in a situation all too often where the user reports only the stack trace (because the web page tells them to:) and you need to decide where to go from there. The more information the better :)

In _MY_ opinion :)

--
 Thorbjørn Ravn Andersen  "...plus... Tubular Bells!"

_______________________________________________
dev mailing list
dev@slf4j.org
http://www.slf4j.org/mailman/listinfo/dev

Reply via email to