[prev in list] [next in list] [prev in thread] [next in thread]
List: slf4j-user
Subject: Re: [slf4j-user] slf4j-user Digest, Vol 56, Issue 14
From: Claude Brisson <claude () renegat ! net>
Date: 2017-03-27 4:47:56
Message-ID: 39c80aec-e0c5-c80b-1dac-86c8d496d06a () renegat ! net
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
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@qos.ch
> <mailto:slf4j-user-request@qos.ch>> wrote:
>
> Send slf4j-user mailing list submissions to
> slf4j-user@qos.ch <mailto:slf4j-user@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@qos.ch <mailto:slf4j-user-request@qos.ch>
>
> You can reach the person managing the list at
> slf4j-user-owner@qos.ch <mailto:slf4j-user-owner@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@alexandriasoftware.com
> <mailto:randall.h.wood@alexandriasoftware.com>>
> To: slf4j-user@qos.ch <mailto:slf4j-user@qos.ch>
> Subject: Re: [slf4j-user] slf4j-user Digest, Vol 56, Issue 13
> Message-ID:
>
> <A821EBDE-7145-4B2B-BCA4-A4EF81E0788F@alexandriasoftware.com
> <mailto:A821EBDE-7145-4B2B-BCA4-A4EF81E0788F@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@qos.ch <mailto:slf4j-user@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@qos.ch
> http://mailman.qos.ch/mailman/listinfo/slf4j-user
[Attachment #5 (text/html)]
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Almost there. It's:<br>
</p>
logger.error("Failed to format {} (user : {})", param1, param2,
ex); <br>
<br>
i.e. if the last function parameter is a throwable, it is considered
as a provided throwable, not as a format parameter.<br>
<br>
<br>
Claude<br>
<br>
<div class="moz-cite-prefix">On 27/03/2017 05:53, chanwook park
wrote:<br>
</div>
<blockquote
cite="mid:CAD-EsAiK2t2=D5esH1mRc2X=AN79q-+4Tz2TX+TAaDKZOwzLTw@mail.gmail.com"
type="cite">
<div dir="ltr">Thanks for your answer.
<div><br>
</div>
<div>I understood to randall's comment, but I want to use with
multi parameterized variable.</div>
<div>For example,</div>
<div><br>
</div>
<div>// usage</div>
<div>logger.error("Failed to format {} (user : {})", ex, param1,
param2); </div>
<div><br>
</div>
<div>// api</div>
<div>Logger.error(String message, Throwable ex, Object... param)</div>
<div><br>
</div>
<div>Is there no way to do this? Or is this problem? </div>
<div><br>
</div>
<div><br>
</div>
<div>chanwook</div>
<div> </div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Mar 22, 2017 at 8:00 PM, <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:slf4j-user-request@qos.ch" \
target="_blank">slf4j-user-request@qos.ch</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Send
slf4j-user mailing list submissions to<br>
<a moz-do-not-send="true"
href="mailto:slf4j-user@qos.ch">slf4j-user@qos.ch</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a moz-do-not-send="true"
href="http://mailman.qos.ch/mailman/listinfo/slf4j-user"
rel="noreferrer" \
target="_blank">http://mailman.qos.ch/mailman/<wbr>listinfo/slf4j-user</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a moz-do-not-send="true"
href="mailto:slf4j-user-request@qos.ch">slf4j-user-request@qos.ch</a><br>
<br>
You can reach the person managing the list at<br>
<a moz-do-not-send="true"
href="mailto:slf4j-user-owner@qos.ch">slf4j-user-owner@qos.ch</a><br>
<br>
When replying, please edit your Subject line so it is more
specific<br>
than "Re: Contents of slf4j-user digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Re: slf4j-user Digest, Vol 56, Issue 13 (Randall Wood)<br>
<br>
<br>
------------------------------<wbr>------------------------------<wbr>----------<br>
<br>
Message: 1<br>
Date: Tue, 21 Mar 2017 07:06:01 -0400<br>
From: Randall Wood <<a moz-do-not-send="true"
href="mailto:randall.h.wood@alexandriasoftware.com">randall.h.wood@<wbr>alexandriasoftware.com</a>><br>
To: <a moz-do-not-send="true"
href="mailto:slf4j-user@qos.ch">slf4j-user@qos.ch</a><br>
Subject: Re: [slf4j-user] slf4j-user Digest, Vol 56, Issue
13<br>
Message-ID:<br>
<<a moz-do-not-send="true"
href="mailto:A821EBDE-7145-4B2B-BCA4-A4EF81E0788F@alexandriasoftware.com">A821EBDE-7145-4B2B-BCA4-<wbr>A4EF81E0788F@<wbr>alexandriasoftware.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
<br>
> I don't see the javadoc describing that behavior.<br>
> <a moz-do-not-send="true"
href="https://www.slf4j.org/api/org/slf4j/Logger.html"
rel="noreferrer" \
target="_blank">https://www.slf4j.org/api/org/<wbr>slf4j/Logger.html</a> <<a \
moz-do-not-send="true" href="https://www.slf4j.org/api/org/slf4j/Logger.html"
rel="noreferrer" \
target="_blank">https://www.slf4j.org/api/<wbr>org/slf4j/Logger.html</a>><br> \
<br> That Javadoc reads "Be sure to read the FAQ entry relating
to parameterized logging <<a moz-do-not-send="true"
href="https://www.slf4j.org/faq.html#logging_performance"
rel="noreferrer" \
target="_blank">https://www.slf4j.org/faq.<wbr>html#logging_performance</a>>. \
Note that logging statements can be parameterized in presence of an \
exception/throwable <<a moz-do-not-send="true"
href="https://www.slf4j.org/faq.html#paramException"
rel="noreferrer" \
target="_blank">https://www.slf4j.org/faq.<wbr>html#paramException</a>>.” and \
links to <a moz-do-not-send="true" \
href="https://www.slf4j.org/faq.html#paramException"
rel="noreferrer" \
target="_blank">https://www.slf4j.org/faq.<wbr>html#paramException</a> <<a \
moz-do-not-send="true" href="https://www.slf4j.org/faq.html#paramException"
rel="noreferrer" \
target="_blank">https://www.slf4j.org/faq.<wbr>html#paramException</a>> which \
describes that behavior (which applies to all levels of logging with slf4j).<br>
<br>
Randall<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a moz-do-not-send="true"
href="http://mailman.qos.ch/pipermail/slf4j-user/attachments/20170321/4f279862/attachment-0001.html"
rel="noreferrer" target="_blank">http://mailman.qos.ch/<wbr>pipermail/slf4j-user/<wbr>attachments/20170321/4f279862/<wbr>attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
______________________________<wbr>_________________<br>
slf4j-user mailing list<br>
<a moz-do-not-send="true" \
href="mailto:slf4j-user@qos.ch">slf4j-user@qos.ch</a><br> <a moz-do-not-send="true"
href="http://mailman.qos.ch/mailman/listinfo/slf4j-user"
rel="noreferrer" \
target="_blank">http://mailman.qos.ch/mailman/<wbr>listinfo/slf4j-user</a><br> <br>
------------------------------<br>
<br>
End of slf4j-user Digest, Vol 56, Issue 14<br>
******************************<wbr>************<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr"><span \
style="font-size:small">===============================================</span><br>
<span style="font-size:small">박 찬욱 Chanwook Park</span>
<div><br>
</div>
<div>Phone :: 010-9019-2553 </div>
<div><br>
</div>
<div>Github :: <a moz-do-not-send="true"
href="https://github.com/chanwookpark"
target="_blank">https://github.com/chanwookpark</a></div>
<div>Blog :: <a moz-do-not-send="true"
href="http://chanwookpark.github.io"
target="_blank">http://chanwookpark.github.io</a> </div>
<div>LinkedIn :: <a moz-do-not-send="true"
href="https://www.linkedin.com/in/chanwook-park-47304148"
\
target="_blank">https://www.linkedin.com/in/chanwook-park-47304148</a> \
</div>
<div>===============================================</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
slf4j-user mailing list
<a class="moz-txt-link-abbreviated" \
href="mailto:slf4j-user@qos.ch">slf4j-user@qos.ch</a> <a \
class="moz-txt-link-freetext" \
href="http://mailman.qos.ch/mailman/listinfo/slf4j-user">http://mailman.qos.ch/mailman/listinfo/slf4j-user</a></pre>
</blockquote>
<br>
</body>
</html>
[Attachment #6 (text/plain)]
_______________________________________________
slf4j-user mailing list
slf4j-user@qos.ch
http://mailman.qos.ch/mailman/listinfo/slf4j-user
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic