Re: slf4j-user Digest, Vol 56, Issue 14

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: slf4j-user Digest, Vol 56, Issue 14

chanwook park
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, <[hidden email]> wrote:
Send slf4j-user mailing list submissions to
        [hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
        http://mailman.qos.ch/mailman/listinfo/slf4j-user
or, via email, send a message with subject or body 'help' to
        [hidden email]

You can reach the person managing the list at
        [hidden email]

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 <[hidden email]>
To: [hidden email]
Subject: Re: [slf4j-user] slf4j-user Digest, Vol 56, Issue 13
Message-ID:
        <[hidden email]>
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>

That Javadoc reads "Be sure to read the FAQ entry relating to parameterized logging <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>.” and links to 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>

------------------------------

Subject: Digest Footer

_______________________________________________
slf4j-user mailing list
[hidden email]
http://mailman.qos.ch/mailman/listinfo/slf4j-user

------------------------------

End of slf4j-user Digest, Vol 56, Issue 14
******************************************



--
===============================================
박 찬욱 Chanwook Park

Phone :: 010-9019-2553 

===============================================

_______________________________________________
slf4j-user mailing list
[hidden email]
http://mailman.qos.ch/mailman/listinfo/slf4j-user
Reply | Threaded
Open this post in threaded view
|

Re: slf4j-user Digest, Vol 56, Issue 14

Claude Brisson

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, <[hidden email]> wrote:
Send slf4j-user mailing list submissions to
        [hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
        http://mailman.qos.ch/mailman/listinfo/slf4j-user
or, via email, send a message with subject or body 'help' to
        [hidden email]

You can reach the person managing the list at
        [hidden email]

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 <[hidden email]>
To: [hidden email]
Subject: Re: [slf4j-user] slf4j-user Digest, Vol 56, Issue 13
Message-ID:
        <[hidden email]>
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>

That Javadoc reads "Be sure to read the FAQ entry relating to parameterized logging <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>.” and links to 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>

------------------------------

Subject: Digest Footer

_______________________________________________
slf4j-user mailing list
[hidden email]
http://mailman.qos.ch/mailman/listinfo/slf4j-user

------------------------------

End of slf4j-user Digest, Vol 56, Issue 14
******************************************



--
===============================================
박 찬욱 Chanwook Park

Phone :: 010-9019-2553 

===============================================


_______________________________________________
slf4j-user mailing list
[hidden email]
http://mailman.qos.ch/mailman/listinfo/slf4j-user


_______________________________________________
slf4j-user mailing list
[hidden email]
http://mailman.qos.ch/mailman/listinfo/slf4j-user