[SDFAB-726] Improve logging in the ECFlowRuleStore

Currently, we are not able to understand what's exactly went
wrong on the new master and is preventing to activate the
new term. This build improves logging and move to WARN some
useful error prints

Change-Id: Ia00d65dd4fb9ff70d60ccdac3f39882f3c916814
diff --git a/core/store/dist/src/main/java/org/onosproject/store/flow/impl/DeviceFlowTable.java b/core/store/dist/src/main/java/org/onosproject/store/flow/impl/DeviceFlowTable.java
index a257cbd..7f0c041 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/flow/impl/DeviceFlowTable.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/flow/impl/DeviceFlowTable.java
@@ -668,10 +668,11 @@
      * @param newReplicaInfo  the new replica info
      */
     private void syncFlowsOnMaster(DeviceReplicaInfo prevReplicaInfo, DeviceReplicaInfo newReplicaInfo) {
+        log.info("syncFlowsOnMaster {}", prevReplicaInfo.master());
         syncFlowsOn(prevReplicaInfo.master())
             .whenCompleteAsync((result, error) -> {
                 if (error != null) {
-                    log.debug("Failed to synchronize flows on previous master {}", prevReplicaInfo.master(), error);
+                    log.warn("Failed to synchronize flows on previous master {}", prevReplicaInfo.master(), error);
                     syncFlowsOnBackups(prevReplicaInfo, newReplicaInfo);
                 } else {
                     activateMaster(newReplicaInfo);
@@ -690,10 +691,11 @@
             .stream()
             .filter(nodeId -> !nodeId.equals(localNodeId))
             .collect(Collectors.toList());
+        log.info("syncFlowsOnBackups {}", backups);
         syncFlowsOn(backups)
             .whenCompleteAsync((result, error) -> {
                 if (error != null) {
-                    log.debug("Failed to synchronize flows on previous backup nodes {}", backups, error);
+                    log.warn("Failed to synchronize flows on previous backup nodes {}", backups, error);
                 }
                 activateMaster(newReplicaInfo);
             }, executor);
@@ -721,6 +723,7 @@
      * @return a future to be completed once the flows have been synchronizes
      */
     private CompletableFuture<Void> syncFlowsOn(NodeId nodeId) {
+        log.info("syncFlowsOn {}", nodeId);
         return requestDigests(nodeId)
             .thenCompose(digests -> Tools.allOf(digests.stream()
                 .filter(digest -> digest.isNewerThan(getDigest(digest.bucket())))
@@ -737,6 +740,7 @@
      * @return a future to be completed once the bucket has been synchronizes
      */
     private CompletableFuture<Void> syncBucketOn(NodeId nodeId, int bucketNumber) {
+        log.info("syncBucket {} on {}", bucketNumber, nodeId);
         return requestBucket(nodeId, bucketNumber)
             .thenAcceptAsync(flowBucket -> {
                 flowBuckets.compute(flowBucket.bucketId().bucket(),
@@ -752,7 +756,7 @@
      * @return a future to be completed with the bucket
      */
     private CompletableFuture<FlowBucket> requestBucket(NodeId nodeId, int bucket) {
-        log.debug("Requesting flow bucket {} from {}", bucket, nodeId);
+        log.info("Requesting flow bucket {} from {}", bucket, nodeId);
         return sendWithTimestamp(bucket, getBucketSubject, nodeId);
     }
 
@@ -773,7 +777,7 @@
      */
     private void activateMaster(DeviceReplicaInfo replicaInfo) {
         if (replicaInfo.isMaster(localNodeId)) {
-            log.debug("Activating term {} for device {}", replicaInfo.term(), deviceId);
+            log.info("Activating term {} for device {}", replicaInfo.term(), deviceId);
             for (int i = 0; i < NUM_BUCKETS; i++) {
                 activateBucket(i);
             }