Github user hanm commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/561#discussion_r201527427
  
    --- Diff: src/java/main/org/apache/zookeeper/jmx/MBeanRegistry.java ---
    @@ -124,9 +124,7 @@ private void unregister(String path,ZKMBeanInfo bean) 
throws JMException  {
                 return;
             if (!bean.isHidden()) {
                 final ObjectName objName = makeObjectName(path, bean);
    -            if (LOG.isInfoEnabled()) {
    -                LOG.info("Unregister MBean [{}]", objName);
    -            }
    +            LOG.debug("Unregister MBean [{}]", objName);
    --- End diff --
    
    this sounds an optimization as with the if clause presence, if the log is 
not enabled the objName is not copied which might help if copying objName is 
expensive. sounds not a very big deal (and i noticed we have two inconsistent 
logging style in code base, with or without this if clause, might worth a clean 
up).


---

Reply via email to