You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2022/04/07 18:47:40 UTC

[GitHub] [accumulo] milleruntime commented on a diff in pull request #2615: Add details to ZooKeeper watcher logs

milleruntime commented on code in PR #2615:
URL: https://github.com/apache/accumulo/pull/2615#discussion_r845464179


##########
core/src/main/java/org/apache/accumulo/fate/zookeeper/ServiceLock.java:
##########
@@ -311,22 +311,19 @@ private synchronized void determineLockOwnership(final String createdEphemeralNo
         @Override
         public void process(WatchedEvent event) {
           if (LOG.isTraceEnabled()) {
-            LOG.trace("[{}] Processing event:", vmLockPrefix);
-            LOG.trace("- type  {}", event.getType());
-            LOG.trace("- path  {}", event.getPath());
-            LOG.trace("- state {}", event.getState());
+            LOG.trace("[{}] Processing {}", vmLockPrefix, event);

Review Comment:
   Printing the values in one log statement is nice cause of the likelihood of multiple threads. Does the `WatchedEvent` type toString() print the same values?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org