[slf4j-user] Overloads taking both format arguments and Throwable
Alexey Romanov
alexey.v.romanov at gmail.com
Mon May 21 12:07:03 CEST 2012
I see, thank you!
Yours, Alexey Romanov
On Mon, May 21, 2012 at 2:00 PM, <slf4j-user-request at qos.ch> wrote:
> Message: 1
> Date: Sun, 20 May 2012 19:57:39 +0200
> From: ceki <ceki at qos.ch>
> To: User list for the slf4j project <slf4j-user at qos.ch>
> Subject: Re: [slf4j-user] Overloads taking both format arguments and
> Throwable
> Message-ID: <4FB93093.6040105 at qos.ch>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>
>
>
> 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
>
>
> ------------------------------
>
> _______________________________________________
> slf4j-user mailing list
> slf4j-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/slf4j-user
>
> End of slf4j-user Digest, Vol 8, Issue 8
> ****************************************
More information about the slf4j-user
mailing list