This is an automated email from the ASF dual-hosted git repository.

mattyb149 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
     new 8eb0db6  NIFI-8083: SSLSocketChannel Logging Improvement
8eb0db6 is described below

commit 8eb0db6b38173b3993c8e10babd42284ee42f35b
Author: David Mollitor <[email protected]>
AuthorDate: Thu Dec 10 16:40:04 2020 -0500

    NIFI-8083: SSLSocketChannel Logging Improvement
    
    Fixed additional logs messages with same issue
    
    Signed-off-by: Matthew Burgess <[email protected]>
    
    This closes #4722
---
 .../nifi/remote/io/socket/ssl/SSLSocketChannel.java       | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git 
a/nifi-commons/nifi-security-utils/src/main/java/org/apache/nifi/remote/io/socket/ssl/SSLSocketChannel.java
 
b/nifi-commons/nifi-security-utils/src/main/java/org/apache/nifi/remote/io/socket/ssl/SSLSocketChannel.java
index 6dd167f..bff50cf 100644
--- 
a/nifi-commons/nifi-security-utils/src/main/java/org/apache/nifi/remote/io/socket/ssl/SSLSocketChannel.java
+++ 
b/nifi-commons/nifi-security-utils/src/main/java/org/apache/nifi/remote/io/socket/ssl/SSLSocketChannel.java
@@ -170,10 +170,7 @@ public class SSLSocketChannel implements Closeable {
 
             connected = true;
         } catch (final Exception e) {
-            logger.error("{} Failed to connect due to {}", this, e);
-            if (logger.isDebugEnabled()) {
-                logger.error("", e);
-            }
+            logger.error("{} failed to connect", this, e);
             closeQuietly(channel);
             engine.closeInbound();
             engine.closeOutbound();
@@ -397,10 +394,7 @@ public class SSLSocketChannel implements Closeable {
         try {
             readCount = channel.read(writableInBuffer);
         } catch (IOException e) {
-            logger.error("{} Failed to readData due to {}", new Object[]{this, 
e});
-            if (logger.isDebugEnabled()) {
-                logger.error("", e);
-            }
+            logger.error("{} failed to read data", this, e);
             readCount = -1; // treat the condition same as if End of Stream
         }
         if (readCount == 0) {
@@ -428,10 +422,7 @@ public class SSLSocketChannel implements Closeable {
                     return false;
                 }
             } catch (IOException e) {
-                logger.error("{} Failed to check if closed due to {}. Closing 
channel.", new Object[]{this, e});
-                if (logger.isDebugEnabled()) {
-                    logger.error("", e);
-                }
+                logger.error("{} failed to check if closed. Closing channel.", 
this, e);
             }
         }
         // either readCount is -1, indicating an end of stream, or the peer 
sent a closure handshake

Reply via email to