Tsz-wo Sze created RATIS-1946:
---------------------------------

             Summary: 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


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