Add more log for debugging.

Change-Id: I384729ae6b96a5e6fb6529f92cd4606b0262d46e
diff --git a/core/api/src/main/java/org/onosproject/net/intent/IntentData.java b/core/api/src/main/java/org/onosproject/net/intent/IntentData.java
index c30993e..2f29645 100644
--- a/core/api/src/main/java/org/onosproject/net/intent/IntentData.java
+++ b/core/api/src/main/java/org/onosproject/net/intent/IntentData.java
@@ -257,6 +257,7 @@
         } else if (currentData.version().isOlderThan(newData.version())) {
             return true;
         } else if (currentData.version().isNewerThan(newData.version())) {
+            log.trace("{} update not acceptable: current is newer", newData.key());
             return false;
         }
 
@@ -267,6 +268,7 @@
         switch (newState) {
         case INSTALLING:
             if (currentState == INSTALLING) {
+                log.trace("{} update not acceptable: no-op INSTALLING", newData.key());
                 return false;
             }
             // FALLTHROUGH
@@ -283,11 +285,13 @@
 
         case WITHDRAWING:
             if (currentState == WITHDRAWING) {
+                log.trace("{} update not acceptable: no-op WITHDRAWING", newData.key());
                 return false;
             }
             // FALLTHROUGH
         case WITHDRAWN:
             if (currentState == WITHDRAWN) {
+                log.trace("{} update not acceptable: no-op WITHDRAWN", newData.key());
                 return false;
             } else if (currentState == INSTALLING || currentState == INSTALLED
                     || currentState == PURGE_REQ) {
@@ -299,12 +303,14 @@
 
         case FAILED:
             if (currentState == FAILED) {
+                log.trace("{} update not acceptable: no-op FAILED", newData.key());
                 return false;
             }
             return true;
 
         case CORRUPT:
             if (currentState == CORRUPT) {
+                log.trace("{} update not acceptable: no-op CORRUPT", newData.key());
                 return false;
             }
             return true;
diff --git a/core/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java b/core/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java
index 2bd6ca2..7e601f2 100644
--- a/core/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java
+++ b/core/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java
@@ -410,7 +410,7 @@
                     try {
                         frp.applyFlowRule(flowRule);
                     } catch (UnsupportedOperationException e) {
-                        log.warn(e.getMessage());
+                        log.warn("Unsupported operation", e);
                         if (flowRule instanceof DefaultFlowEntry) {
                             //FIXME modification of "stored" flow entry outside of store
                             ((DefaultFlowEntry) flowRule).setState(FlowEntry.FlowEntryState.FAILED);
@@ -530,7 +530,7 @@
                         }
                     }
                 } catch (Exception e) {
-                    log.debug("Can't process added or extra rule {}", e.getMessage());
+                    log.warn("Can't process added or extra rule {}", e);
                 }
             }
 
@@ -542,7 +542,7 @@
                         log.debug("Adding rule in store, but not on switch {}", rule);
                         flowMissing(rule);
                     } catch (Exception e) {
-                        log.debug("Can't add missing flow rule:", e);
+                        log.warn("Can't add missing flow rule:", e);
                     }
                 }
             }
diff --git a/core/store/dist/src/main/java/org/onosproject/store/intent/impl/GossipIntentStore.java b/core/store/dist/src/main/java/org/onosproject/store/intent/impl/GossipIntentStore.java
index 6ccb629..31adf1f 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/intent/impl/GossipIntentStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/intent/impl/GossipIntentStore.java
@@ -291,6 +291,8 @@
             } else {
                 currentMap.put(newData.key(), new IntentData(newData));
             }
+        } else {
+            log.debug("Update for {} not acceptable", newData.key());
         }
         // Remove the intent data from the pending map if the newData is more
         // recent or equal to the existing entry. No matter if it is an acceptable
@@ -304,6 +306,8 @@
 
         if (!existingValue.version().isNewerThan(newData.version())) {
             pendingMap.remove(key, existingValue);
+        } else {
+            log.debug("{} in pending map was newer, leaving it there", key);
         }
     }
 
diff --git a/tools/test/bin/onos-check-intent b/tools/test/bin/onos-check-intent
index a53e639..65d34e6 100755
--- a/tools/test/bin/onos-check-intent
+++ b/tools/test/bin/onos-check-intent
@@ -37,11 +37,13 @@
             && [ $numIntents -eq $numIntentsExpected ] \
             && cat $aux && exit 0
     fi
+    onos $target "onos:flows -s -n"
     sleep 2
 done
 
 # failed. print informations
 echo "Failed print information for debugging"
+onos $target date
 onos $target "onos:intents"
 onos $target "onos:intent-details"
 onos $target "onos:flows -s -n"