Do not use LogicalDatastoreType.name() in logging 50/107250/1
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 3 Aug 2023 17:11:28 +0000 (19:11 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 4 Aug 2023 08:30:32 +0000 (10:30 +0200)
Issuing name() has no effect -- it is the same as toString(), and slf4j
will do that for us.

Change-Id: Ibb89475de803bd2f77e190f96264e2cebe0065d4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 803fa31e5301ddf9a48ebdac9a07c6fbe8c6a042)

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);
     }
 }