From: Jason Ye Date: Tue, 16 Apr 2013 21:05:50 +0000 (+0000) Subject: Merge "Fix Logging for Topology Manager" X-Git-Tag: releasepom-0.1.0~565 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=b4909e4603dc3989463e1a0d86b6007219eb472f;hp=e069a67938c03ffac351b8fddaa2cc09cab1be88 Merge "Fix Logging for Topology Manager" --- diff --git a/opendaylight/topologymanager/src/main/java/org/opendaylight/controller/topologymanager/internal/TopologyManagerImpl.java b/opendaylight/topologymanager/src/main/java/org/opendaylight/controller/topologymanager/internal/TopologyManagerImpl.java index 227df54944..0eb7bdbc5c 100644 --- a/opendaylight/topologymanager/src/main/java/org/opendaylight/controller/topologymanager/internal/TopologyManagerImpl.java +++ b/opendaylight/topologymanager/src/main/java/org/opendaylight/controller/topologymanager/internal/TopologyManagerImpl.java @@ -95,23 +95,26 @@ public class TopologyManagerImpl implements ITopologyManager, void setTopologyManagerAware(ITopologyManagerAware s) { if (this.topologyManagerAware != null) { - log.debug("Adding ITopologyManagerAware: " + s); + log.debug("Adding ITopologyManagerAware: {}", s); this.topologyManagerAware.add(s); } } void unsetTopologyManagerAware(ITopologyManagerAware s) { if (this.topologyManagerAware != null) { + log.debug("Removing ITopologyManagerAware: {}", s); this.topologyManagerAware.remove(s); } } void setTopoService(ITopologyService s) { + log.debug("Adding ITopologyService: {}", s); this.topoService = s; } void unsetTopoService(ITopologyService s) { if (this.topoService == s) { + log.debug("Removing ITopologyService: {}", s); this.topoService = null; } } @@ -229,7 +232,7 @@ public class TopologyManagerImpl implements ITopologyManager, this.clusterContainerService .destroyCache("topologymanager.nodeConnectorDB"); this.nodeConnectorsDB = null; - log.debug("Topology Manager DB DE-allocated"); + log.debug("Topology Manager DB Deallocated"); } @SuppressWarnings("unchecked") @@ -408,7 +411,7 @@ public class TopologyManagerImpl implements ITopologyManager, if (this.hostsDB == null) { return; } - + switch (t) { case ADDED: case CHANGED: @@ -470,6 +473,7 @@ public class TopologyManagerImpl implements ITopologyManager, new HashSet()); this.nodeConnectorsDB.put(e.getTailNodeConnector(), new HashSet()); + log.trace("Edge {} {}", e.toString(), type.name()); break; case REMOVED: // Now remove the edge from edgesDB @@ -484,6 +488,7 @@ public class TopologyManagerImpl implements ITopologyManager, // should be safe to assume that won't happen. this.nodeConnectorsDB.remove(e.getHeadNodeConnector()); this.nodeConnectorsDB.remove(e.getTailNodeConnector()); + log.trace("Edge {} {}", e.toString(), type.name()); break; case CHANGED: Set old_props = this.edgesDB.get(e); @@ -530,6 +535,7 @@ public class TopologyManagerImpl implements ITopologyManager, // Finally update this.edgesDB.put(e, props); + log.trace("Edge {} {}", e.toString(), type.name()); break; } @@ -675,16 +681,16 @@ public class TopologyManagerImpl implements ITopologyManager, //oneTopology.deleteUserConfiguredLink(linkTuple); } catch (Exception e) { log - .warn("Harmless : Exception while Deleting User Configured link " - + link + " " + e.toString()); + .warn("Harmless : Exception while Deleting User Configured link {} {}", + link, e.toString()); } linkTuple = getReverseLinkTuple(link); try { //oneTopology.deleteUserConfiguredLink(linkTuple); } catch (Exception e) { log - .error("Harmless : Exception while Deleting User Configured Reverse link " - + link + " " + e.toString()); + .warn("Harmless : Exception while Deleting User Configured Reverse link {} {}", + link, e.toString()); } } return new Status(StatusCode.SUCCESS, null); @@ -822,12 +828,12 @@ public class TopologyManagerImpl implements ITopologyManager, @Override public void edgeOverUtilized(Edge edge) { - log.warn("Link Utilization above normal: " + edge); + log.warn("Link Utilization above normal: {}", edge); } @Override public void edgeUtilBackToNormal(Edge edge) { - log.warn("Link Utilization back to normal: " + edge); + log.warn("Link Utilization back to normal: {}", edge); } }