Committed by
Gerrit Code Review
LinkManager: log only if link actually disappeared
resolves ONOS-474 Change-Id: I61ec56795eca18b11c61b8fe5722729928bb370c
Showing
1 changed file
with
6 additions
and
3 deletions
... | @@ -255,7 +255,7 @@ public class LinkManager | ... | @@ -255,7 +255,7 @@ public class LinkManager |
255 | checkNotNull(connectPoint, "Connect point cannot be null"); | 255 | checkNotNull(connectPoint, "Connect point cannot be null"); |
256 | checkValidity(); | 256 | checkValidity(); |
257 | 257 | ||
258 | - log.info("Links for connection point {} vanished", connectPoint); | 258 | + log.debug("Links for connection point {} vanished", connectPoint); |
259 | // FIXME: This will remove links registered by other providers | 259 | // FIXME: This will remove links registered by other providers |
260 | removeLinks(getLinks(connectPoint), true); | 260 | removeLinks(getLinks(connectPoint), true); |
261 | } | 261 | } |
... | @@ -265,7 +265,7 @@ public class LinkManager | ... | @@ -265,7 +265,7 @@ public class LinkManager |
265 | checkNotNull(deviceId, DEVICE_ID_NULL); | 265 | checkNotNull(deviceId, DEVICE_ID_NULL); |
266 | checkValidity(); | 266 | checkValidity(); |
267 | 267 | ||
268 | - log.info("Links for device {} vanished", deviceId); | 268 | + log.debug("Links for device {} vanished", deviceId); |
269 | removeLinks(getDeviceLinks(deviceId), true); | 269 | removeLinks(getDeviceLinks(deviceId), true); |
270 | } | 270 | } |
271 | } | 271 | } |
... | @@ -276,7 +276,10 @@ public class LinkManager | ... | @@ -276,7 +276,10 @@ public class LinkManager |
276 | LinkEvent event = isSoftRemove ? | 276 | LinkEvent event = isSoftRemove ? |
277 | store.removeOrDownLink(link.src(), link.dst()) : | 277 | store.removeOrDownLink(link.src(), link.dst()) : |
278 | store.removeLink(link.src(), link.dst()); | 278 | store.removeLink(link.src(), link.dst()); |
279 | - post(event); | 279 | + if (event != null) { |
280 | + log.info("Link {} removed/vanished", event.subject()); | ||
281 | + post(event); | ||
282 | + } | ||
280 | } | 283 | } |
281 | } | 284 | } |
282 | 285 | ... | ... |
-
Please register or login to post a comment