[ 
https://issues.apache.org/jira/browse/RATIS-1946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17791800#comment-17791800
 ] 

Attila Doroszlai commented on RATIS-1946:
-----------------------------------------

It seems these {{Annotated\*Exception}} classes just wrap the underlying 
exception, adding the remote address to the message.  Their 
{{fillInStackTrace()}} are no-ops.

> slf4j: Exception may not be printed.
> ------------------------------------
>
>                 Key: RATIS-1946
>                 URL: https://issues.apache.org/jira/browse/RATIS-1946
>             Project: Ratis
>          Issue Type: Improvement
>            Reporter: Tsz-wo Sze
>            Assignee: Tsz-wo Sze
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The "{}" message format syntax does not work for exception.
> {code}
> //PeerProxyMap.java
>      } catch (IOException e) {
>       LOG.warn("{}: Failed to close proxy for peer {}, proxy class: {}",
>           name, pp, proxy.getClass(), e);
>      }
> {code}
> As an example, the exception e and its stack trace will not be printed in the 
> code above since it is calling
> {code}
> //org.slf4j.Logger
>   void warn(String var1, Object... var2);
> {code}
> with one "{}" less.  There are three "{}" but four objects (including e).  
> The expectation is to call
> {code}
>   void warn(String var1, Object var2, Object var3, Object var4, Throwable 
> var5);
> {code}
> but such method does not exist.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to