Fix LOG formatting issues 77/36977/2
authorRyan Goulding <ryandgoulding@gmail.com>
Thu, 31 Mar 2016 20:20:31 +0000 (16:20 -0400)
committerTony Tkacik <ttkacik@cisco.com>
Mon, 4 Apr 2016 08:24:16 +0000 (08:24 +0000)
In a few places, LOG statements are updated to utilize proper
formatting.

Change-Id: Ic1d0f50a6b561ee1e70e76d096b78928d5af65b1
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/tree/AbstractCursorAware.java
yang/yang-data-util/src/main/java/org/opendaylight/yangtools/yang/data/util/LeafInterner.java
yang/yang-data-util/src/main/java/org/opendaylight/yangtools/yang/data/util/LeafsetEntryInterner.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/AugmentStatementImpl.java

index 7532406744d8025f27d63cd58aa575fce0435203..58f381582545891e73616c2d748ad4a927021a81 100644 (file)
@@ -28,7 +28,7 @@ abstract class AbstractCursorAware {
     final void closeCursor(final AbstractCursor<?> cursor) {
         final boolean success = CURSOR_UPDATER.compareAndSet(this, cursor, null);
         if (!success) {
-            LOG.warn("Attempted to close cursor %s while %s is open", cursor, this.cursor);
+            LOG.warn("Attempted to close cursor {} while {} is open", cursor, this.cursor);
         }
     }
 }
index b04a02ce2c1f7e54f7c7914f88a5e493a2761427..c36ee174b4b39cea7887ecddec3809d63f0b0503 100644 (file)
@@ -57,7 +57,7 @@ public abstract class LeafInterner {
             // All checks completed, intern the sample
             @SuppressWarnings("unchecked")
             final T ret = (T) INTERNER.intern(sample);
-            LOG.trace("Interned object %s to %s", sample, ret);
+            LOG.trace("Interned object {} to {}", sample, ret);
             return ret;
         }
     }
index 69f495fa6f8adf39494427336d376f3775e6c4ea..b181d5c7ffbdaf7ae64cddcd4b72b4fb77ab59dc 100644 (file)
@@ -56,7 +56,7 @@ public final class LeafsetEntryInterner {
          */
         @SuppressWarnings("unchecked")
         final T ret = (T) INTERNER.intern(sample);
-        LOG.trace("Interned object %s to %s", sample, ret);
+        LOG.trace("Interned object {} to {}", sample, ret);
         return ret;
     }
 
index f553a8806417b225f9cf83e242a7a662af57dfc4..0638d31abdbe763935d0b09c741ecca899df3d1f 100644 (file)
@@ -120,8 +120,9 @@ public class AugmentStatementImpl extends AbstractDeclaredStatement<SchemaNodeId
                         augmentTargetCtx.addEffectiveSubstatement(augmentSourceCtx);
                         updateAugmentOrder(augmentSourceCtx);
                     } catch (SourceException e) {
-                        LOG.debug("Failed to add augmentation %s defined at {}",
-                            augmentSourceCtx.getStatementSourceReference(), e);
+                        LOG.debug("Failed to add augmentation {} defined at {}",
+                            augmentTargetCtx.getStatementSourceReference(),
+                                augmentSourceCtx.getStatementSourceReference(), e);
                     }
                 }