[slf4j-user] Overloads taking both format arguments and Throwable
ceki
ceki at qos.ch
Sun May 20 19:57:39 CEST 2012
On 15.05.2012 09:10, Alexey Romanov wrote:
> Why doesn't Logger have overloads of logging methods which take both
> Object arguments to replace {} and an exception? I.e.
> Logger.error(String, Object, Throwable), Logger.error(String, Object,
> Object, Throwable), Logger.error(String, Object[], Throwable)? It
> seems to me there should be no problem with overload resolution.
Hi Alexey,
Because it would entail the addition of 10 new methods to the Logger
interface. Moreover, as of SLF4J 1.6.0, if the last argument is an
exception it is treated as such. See also [1].
HTH,
[1] http://www.slf4j.org/faq.html#paramException
> Yours, Alexey Romanov
--
Ceki
http://twitter.com/#!/ceki
More information about the slf4j-user
mailing list