From: Jaroslav Tóth Date: Tue, 26 Oct 2021 18:27:25 +0000 (+0200) Subject: Added channel to logs in NETCONF negotiator X-Git-Tag: v2.0.9~5 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=5314b2909e2122a211741372dd6514c09bdd393a;p=netconf.git Added channel to logs in NETCONF negotiator - It simplifies debugging and investigation of deployment with a lot of NETCONF MPs. JIRA: NETCONF-827 Change-Id: I221aab35e8d8d63481130678e1c755077125ad74 Signed-off-by: Jaroslav Tóth Signed-off-by: Robert Varga --- diff --git a/netconf/netconf-client/src/main/java/org/opendaylight/netconf/client/NetconfClientSessionNegotiator.java b/netconf/netconf-client/src/main/java/org/opendaylight/netconf/client/NetconfClientSessionNegotiator.java index 1816fee0e0..46ae45589f 100644 --- a/netconf/netconf-client/src/main/java/org/opendaylight/netconf/client/NetconfClientSessionNegotiator.java +++ b/netconf/netconf-client/src/main/java/org/opendaylight/netconf/client/NetconfClientSessionNegotiator.java @@ -73,7 +73,7 @@ public class NetconfClientSessionNegotiator extends try { startNegotiation(); } catch (final Exception e) { - LOG.warn("Unexpected negotiation failure", e); + LOG.warn("Unexpected negotiation failure on channel {}", channel, e); negotiationFailed(e); return; } diff --git a/netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/AbstractNetconfSessionNegotiator.java b/netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/AbstractNetconfSessionNegotiator.java index 978bd381c2..171d8d2cdf 100644 --- a/netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/AbstractNetconfSessionNegotiator.java +++ b/netconf/netconf-netty-util/src/main/java/org/opendaylight/netconf/nettyutil/AbstractNetconfSessionNegotiator.java @@ -126,12 +126,14 @@ public abstract class AbstractNetconfSessionNegotiator

) future -> { @@ -235,7 +237,7 @@ public abstract class AbstractNetconfSessionNegotiator

{ if (!f.isSuccess()) { - LOG.info("Failed to send message {}", msg, f.cause()); + LOG.info("Failed to send message {} on channel {}", msg, channel, f.cause()); negotiationFailed(f.cause()); } else { - LOG.trace("Message {} sent to socket", msg); + LOG.trace("Message {} sent to socket on channel {}", msg, channel); } }); } @@ -314,7 +317,7 @@ public abstract class AbstractNetconfSessionNegotiator