From f6fa5e9c1c613feafdc654de23915432b3f1ddbc Mon Sep 17 00:00:00 2001 From: Alessandro Boch Date: Thu, 6 Feb 2014 16:40:09 -0800 Subject: [PATCH] Lower logger level in OF1.0 Discovery Service - Discovery Service has a function to attempt to snoop non controller generated or malformed LLDP frames. The whole function block is in a try catch block, as exceptions are well expected. In case an exception is hit though, the function logs it as a warn. - Change the log level to debug, do not print a stack trace, print the source MAC and the port on which it was received. Change-Id: I82b459b16356b0a57934b3c26c993d20a2b53dc2 Signed-off-by: Alessandro Boch --- .../openflow/internal/DiscoveryService.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/DiscoveryService.java b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/DiscoveryService.java index 394be07dee..b29ce15f56 100644 --- a/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/DiscoveryService.java +++ b/opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/DiscoveryService.java @@ -391,7 +391,12 @@ public class DiscoveryService implements IInventoryShimExternalListener, IDataPa updateProdEdge(edge, props); } catch (Exception e) { - logger.warn("Caught exception ", e); + if (logger.isDebugEnabled()) { + logger.debug( + "Caught exception while attempting to snoop non controller generated or malformed LLDP frame sent by {} and received on {}: {}", + HexEncode.bytesToHexStringFormat(ethPkt.getSourceMACAddress()), dstNodeConnector, + e.getMessage()); + } } } -- 2.36.6