From: Alessandro Boch Date: Fri, 7 Feb 2014 00:40:09 +0000 (-0800) Subject: Lower logger level in OF1.0 Discovery Service X-Git-Tag: autorelease-tag-v20140601202136_82eb3f9~511^2 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=f6fa5e9c1c613feafdc654de23915432b3f1ddbc 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 --- 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()); + } } }