Add payload along with the log.trace message for REST call 36/30736/2
authoradetalhouet <adetalhouet@inocybe.com>
Fri, 4 Dec 2015 20:34:10 +0000 (15:34 -0500)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 7 Dec 2015 13:29:13 +0000 (13:29 +0000)
Also add the log.trace for the POST request

Change-Id: I6afce862389d7e61d10359c70387d5726b546915
Signed-off-by: adetalhouet <adetalhouet@inocybe.com>
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/BrokerFacade.java

index b8d9561a26069aab4fbfc94bd134f729b4dd4a23..e14b0aa472db84abeffdb0633ca7758d1015ba21 100644 (file)
@@ -216,6 +216,7 @@ public class BrokerFacade {
         // FIXME: This is doing correct post for container and list children
         //        not sure if this will work for choice case
         if(payload instanceof MapNode) {
+            LOG.trace("POST " + datastore.name() + " via Restconf: {} with payload {}", path, payload);
             final NormalizedNode<?, ?> emptySubtree = ImmutableNodes.fromInstanceId(schemaContext, path);
             rWTransaction.merge(datastore, YangInstanceIdentifier.create(emptySubtree.getIdentifier()), emptySubtree);
             ensureParentsByMerge(datastore, path, rWTransaction, schemaContext);
@@ -251,7 +252,7 @@ public class BrokerFacade {
     private CheckedFuture<Void, TransactionCommitFailedException> putDataViaTransaction(
             final DOMDataReadWriteTransaction writeTransaction, final LogicalDatastoreType datastore,
             final YangInstanceIdentifier path, final NormalizedNode<?, ?> payload, final SchemaContext schemaContext) {
-        LOG.trace("Put " + datastore.name() + " via Restconf: {}", path);
+        LOG.trace("Put " + datastore.name() + " via Restconf: {} with payload {}", path, payload);
         ensureParentsByMerge(datastore, path, writeTransaction, schemaContext);
         writeTransaction.put(datastore, path, payload);
         return writeTransaction.submit();