Merge "Fixed inappropriate uses of log level INFO"
[controller.git] / opendaylight / forwarding / staticrouting / src / main / java / org / opendaylight / controller / forwarding / staticrouting / internal / StaticRoutingImplementation.java
index 2ce2465d976e28a82a7a3bc8e66ddc9df144300c..fe00b774f5113090b6841a986d3154e8f8564f9d 100644 (file)
@@ -143,7 +143,7 @@ public class StaticRoutingImplementation implements IfNewHostNotify, IForwarding
     @SuppressWarnings("deprecation")
     private void allocateCaches() {
         if (this.clusterContainerService == null) {
-            log.info("un-initialized clusterContainerService, can't create cache");
+            log.trace("un-initialized clusterContainerService, can't create cache");
             return;
         }
 
@@ -162,7 +162,7 @@ public class StaticRoutingImplementation implements IfNewHostNotify, IForwarding
     @SuppressWarnings({ "unchecked", "deprecation" })
     private void retrieveCaches() {
         if (this.clusterContainerService == null) {
-            log.info("un-initialized clusterContainerService, can't retrieve cache");
+            log.warn("un-initialized clusterContainerService, can't retrieve cache");
             return;
         }
 
@@ -181,7 +181,7 @@ public class StaticRoutingImplementation implements IfNewHostNotify, IForwarding
 
     private void notifyStaticRouteUpdate(StaticRoute s, boolean update) {
         if (this.staticRoutingAware != null) {
-            log.info("Invoking StaticRoutingAware listeners");
+            log.trace("Invoking StaticRoutingAware listeners");
             synchronized (this.staticRoutingAware) {
                 for (IStaticRoutingAware ra : this.staticRoutingAware) {
                     try {
@@ -427,7 +427,7 @@ public class StaticRoutingImplementation implements IfNewHostNotify, IForwarding
         allocateCaches();
         retrieveCaches();
         this.executor = Executors.newFixedThreadPool(1);
-        if (staticRouteConfigs.isEmpty()) {
+        if ((clusterContainerService != null) && (clusterContainerService.amICoordinator())) {
             loadConfiguration();
         }