Merge "Revert "Use single-argument form of firstKeyOf()""
[ovsdb.git] / southbound / southbound-impl / src / main / java / org / opendaylight / ovsdb / southbound / ovsdb / transact / TransactInvokerImpl.java
index 66031ca6bf8ce90f947fea7fd4ec19ee4e4bc503..ce35156e682c6b0e8b7c433dcb5c59522c5c1b40 100644 (file)
@@ -19,12 +19,12 @@ import org.slf4j.LoggerFactory;
 import com.google.common.util.concurrent.ListenableFuture;
 
 public class TransactInvokerImpl implements TransactInvoker {
-    private static final Logger LOG = LoggerFactory.getLogger(BridgeCreateCommand.class);
+    private static final Logger LOG = LoggerFactory.getLogger(BridgeUpdateCommand.class);
     private OvsdbConnectionInstance connectionInstance;
     private DatabaseSchema dbSchema;
 
     public TransactInvokerImpl(OvsdbConnectionInstance connectionInstance, DatabaseSchema dbSchema) {
-        this.connectionInstance =connectionInstance;
+        this.connectionInstance = connectionInstance;
         this.dbSchema = dbSchema;
     }
 
@@ -33,11 +33,15 @@ public class TransactInvokerImpl implements TransactInvoker {
         TransactionBuilder tb = new TransactionBuilder(connectionInstance, dbSchema);
         command.execute(tb);
         ListenableFuture<List<OperationResult>> result = tb.execute();
-        try {
-            List<OperationResult> got = result.get();
-            LOG.debug("Results of create bridge request",got);
-        } catch (Exception e){
-            LOG.warn("Transact execution exception: ",e);
+        LOG.debug("invoke: command: {}, tb: {}", command, tb);
+        if (tb.getOperations().size() > 0) {
+            try {
+                List<OperationResult> got = result.get();
+                LOG.debug("OVSDB transaction result: {}", got);
+            } catch (Exception e) {
+                LOG.warn("Transact execution exception: ", e);
+            }
+            LOG.trace("invoke exit command: {}, tb: {}", command, tb);
         }
     }