[slf4j-user] slf4j-user Digest, Vol 56, Issue 14

Claude Brisson claude at renegat.net
Mon Mar 27 06:47:56 CEST 2017


Almost there. It's:

   logger.error("Failed to format {} (user : {})", param1, param2, ex);

i.e. if the last function parameter is a throwable, it is considered as 
a provided throwable, not as a format parameter.


   Claude

On 27/03/2017 05:53, chanwook park wrote:
> Thanks for your answer.
>
> I understood to randall's comment, but I want to use with multi 
> parameterized variable.
> For example,
>
> // usage
> logger.error("Failed to format {} (user : {})", ex, param1, param2);
>
> // api
> Logger.error(String message, Throwable ex, Object... param)
>
> Is there no way to do this? Or is this problem?
>
>
> chanwook
>
> On Wed, Mar 22, 2017 at 8:00 PM, <slf4j-user-request at qos.ch 
> <mailto:slf4j-user-request at qos.ch>> wrote:
>
>     Send slf4j-user mailing list submissions to
>     slf4j-user at qos.ch <mailto:slf4j-user at qos.ch>
>
>     To subscribe or unsubscribe via the World Wide Web, visit
>     http://mailman.qos.ch/mailman/listinfo/slf4j-user
>     <http://mailman.qos.ch/mailman/listinfo/slf4j-user>
>     or, via email, send a message with subject or body 'help' to
>     slf4j-user-request at qos.ch <mailto:slf4j-user-request at qos.ch>
>
>     You can reach the person managing the list at
>     slf4j-user-owner at qos.ch <mailto:slf4j-user-owner at qos.ch>
>
>     When replying, please edit your Subject line so it is more specific
>     than "Re: Contents of slf4j-user digest..."
>
>
>     Today's Topics:
>
>        1. Re: slf4j-user Digest, Vol 56, Issue 13 (Randall Wood)
>
>
>     ----------------------------------------------------------------------
>
>     Message: 1
>     Date: Tue, 21 Mar 2017 07:06:01 -0400
>     From: Randall Wood <randall.h.wood at alexandriasoftware.com
>     <mailto:randall.h.wood at alexandriasoftware.com>>
>     To: slf4j-user at qos.ch <mailto:slf4j-user at qos.ch>
>     Subject: Re: [slf4j-user] slf4j-user Digest, Vol 56, Issue 13
>     Message-ID:
>            
>     <A821EBDE-7145-4B2B-BCA4-A4EF81E0788F at alexandriasoftware.com
>     <mailto:A821EBDE-7145-4B2B-BCA4-A4EF81E0788F at alexandriasoftware.com>>
>     Content-Type: text/plain; charset="utf-8"
>
>
>     > I don't see the javadoc describing that behavior.
>     > https://www.slf4j.org/api/org/slf4j/Logger.html
>     <https://www.slf4j.org/api/org/slf4j/Logger.html>
>     <https://www.slf4j.org/api/org/slf4j/Logger.html
>     <https://www.slf4j.org/api/org/slf4j/Logger.html>>
>
>     That Javadoc reads "Be sure to read the FAQ entry relating to
>     parameterized logging
>     <https://www.slf4j.org/faq.html#logging_performance
>     <https://www.slf4j.org/faq.html#logging_performance>>. Note that
>     logging statements can be parameterized in presence of an
>     exception/throwable <https://www.slf4j.org/faq.html#paramException
>     <https://www.slf4j.org/faq.html#paramException>>.” and links to
>     https://www.slf4j.org/faq.html#paramException
>     <https://www.slf4j.org/faq.html#paramException>
>     <https://www.slf4j.org/faq.html#paramException
>     <https://www.slf4j.org/faq.html#paramException>> which describes
>     that behavior (which applies to all levels of logging with slf4j).
>
>     Randall
>     -------------- next part --------------
>     An HTML attachment was scrubbed...
>     URL:
>     <http://mailman.qos.ch/pipermail/slf4j-user/attachments/20170321/4f279862/attachment-0001.html
>     <http://mailman.qos.ch/pipermail/slf4j-user/attachments/20170321/4f279862/attachment-0001.html>>
>
>     ------------------------------
>
>     Subject: Digest Footer
>
>     _______________________________________________
>     slf4j-user mailing list
>     slf4j-user at qos.ch <mailto:slf4j-user at qos.ch>
>     http://mailman.qos.ch/mailman/listinfo/slf4j-user
>     <http://mailman.qos.ch/mailman/listinfo/slf4j-user>
>
>     ------------------------------
>
>     End of slf4j-user Digest, Vol 56, Issue 14
>     ******************************************
>
>
>
>
> -- 
> ===============================================
> 박 찬욱 Chanwook Park
>
> Phone :: 010-9019-2553
>
> Github :: https://github.com/chanwookpark
> Blog :: http://chanwookpark.github.io
> LinkedIn :: https://www.linkedin.com/in/chanwook-park-47304148
> ===============================================
>
>
> _______________________________________________
> slf4j-user mailing list
> slf4j-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/slf4j-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/slf4j-user/attachments/20170327/f02514e0/attachment.html>


More information about the slf4j-user mailing list