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

David Mollitor commented on NIFI-8083:
--------------------------------------

With the changes, the error would say:

{quote}
ERROR [thread] org.apache.nifi.remote.is.sock.ssl.SSLSocketChannel@755110ed 
failed to connect
java.net.SocketTimeoutException: Timed out reading from socket...
{quote}

> SSLSocketChannel Logging Improvement
> ------------------------------------
>
>                 Key: NIFI-8083
>                 URL: https://issues.apache.org/jira/browse/NIFI-8083
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Security
>            Reporter: David Mollitor
>            Priority: Trivial
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> {code:java}
>          logger.error("{} Failed to connect due to {}", this, e);
>             if (logger.isDebugEnabled()) {
>                 logger.error("", e);
>             }
> {code}
> I just came across this in troubleshooting an issue.  The "e" Exception is 
> displayed in the logging with the full stack trace, which was helpful, but it 
> was not passed to the second anchor "{}" and the literal anchor showed up in 
> the message.  I think that as long as SLF4J sees an Exception as the last 
> parameter it will print the stack trace, regardless of the anchor.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to