Hi

I note that the following methods exist:

*error*(Object 
<http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html?is-external=true>
message)

*error*(Object 
<http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html?is-external=true>
message, Throwable
<http://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.html?is-external=true>
t)


But this one does not:

*error*(Throwable
<http://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.html?is-external=true>
t)


Although it's absence is implied by the following JavaDoc on the first
method I referred to:

*WARNING* Note that passing a Throwable
<http://java.sun.com/j2se/1.3/docs/api/java/lang/Throwable.html?is-external=true>
to this method will print the name of the Throwable but no stack
trace. To print a stack trace use the error(Object, Throwable)
<http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Category.html#error(java.lang.Object,%20java.lang.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

Reply via email to