Do not use LogicalDatastoreType.name() in logging
[netconf.git] / restconf / restconf-nb / src / main / java / org / opendaylight / restconf / nb / rfc8040 / rests / utils / PatchDataTransactionUtil.java
index 7667077d16e05baf69262d7f88ee4634eefea828..43cb987fb6841a4165bd0ef036e9ea1b2dd66260 100644 (file)
@@ -154,8 +154,8 @@ public final class PatchDataTransactionUtil {
     private static void createDataWithinTransaction(final YangInstanceIdentifier path, final NormalizedNode payload,
                                                     final EffectiveModelContext schemaContext,
                                                     final RestconfTransaction transaction) {
-        LOG.trace("POST {} within Restconf Patch: {} with payload {}", LogicalDatastoreType.CONFIGURATION.name(),
-            path, payload);
+        LOG.trace("POST {} within Restconf Patch: {} with payload {}", LogicalDatastoreType.CONFIGURATION, path,
+            payload);
         transaction.create(path, payload, schemaContext);
     }
 
@@ -167,7 +167,7 @@ public final class PatchDataTransactionUtil {
      */
     private static void deleteDataWithinTransaction(final YangInstanceIdentifier path,
                                                     final RestconfTransaction transaction) {
-        LOG.trace("Delete {} within Restconf Patch: {}", LogicalDatastoreType.CONFIGURATION.name(), path);
+        LOG.trace("Delete {} within Restconf Patch: {}", LogicalDatastoreType.CONFIGURATION, path);
         transaction.delete(path);
     }
 
@@ -181,8 +181,8 @@ public final class PatchDataTransactionUtil {
     private static void mergeDataWithinTransaction(final YangInstanceIdentifier path, final NormalizedNode payload,
                                                    final EffectiveModelContext schemaContext,
                                                    final RestconfTransaction transaction) {
-        LOG.trace("Merge {} within Restconf Patch: {} with payload {}", LogicalDatastoreType.CONFIGURATION.name(),
-            path, payload);
+        LOG.trace("Merge {} within Restconf Patch: {} with payload {}", LogicalDatastoreType.CONFIGURATION, path,
+            payload);
         TransactionUtil.ensureParentsByMerge(path, schemaContext, transaction);
         transaction.merge(path, payload);
     }
@@ -195,7 +195,7 @@ public final class PatchDataTransactionUtil {
      */
     private static void removeDataWithinTransaction(final YangInstanceIdentifier path,
                                                     final RestconfTransaction transaction) {
-        LOG.trace("Remove {} within Restconf Patch: {}", LogicalDatastoreType.CONFIGURATION.name(), path);
+        LOG.trace("Remove {} within Restconf Patch: {}", LogicalDatastoreType.CONFIGURATION, path);
         transaction.remove(path);
     }
 
@@ -209,8 +209,8 @@ public final class PatchDataTransactionUtil {
     private static void replaceDataWithinTransaction(final YangInstanceIdentifier path, final NormalizedNode payload,
                                                      final EffectiveModelContext schemaContext,
                                                      final RestconfTransaction transaction) {
-        LOG.trace("PUT {} within Restconf Patch: {} with payload {}",
-            LogicalDatastoreType.CONFIGURATION.name(), path, payload);
+        LOG.trace("PUT {} within Restconf Patch: {} with payload {}", LogicalDatastoreType.CONFIGURATION, path,
+            payload);
         transaction.replace(path, payload, schemaContext);
     }
 }