Details
-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
Description
In slf4j-api/src/main/java/org/slf4j/Logger.java it is not specified in the JavaDoc that the last parameter of the argument array for string templates is expected to be treated differently if it extends Throwable.
Pull request that addresses this issue:
https://github.com/qos-ch/slf4j/pull/185
JavaDoc on the interface should explicitly state that if the last element of the array extends Throwable, it will not be used to template the string, and will be "the exception (throwable) to log".
Documenting this expected functionality in docs outside of the JavaDoc is fine, but it should explicitly be stated in the interface contract if implementations are expected to do that.