zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hanm <...@git.apache.org>
Subject [GitHub] zookeeper pull request #561: ZOOKEEPER-3083: Remove some redundant and noisy...
Date Tue, 10 Jul 2018 23:34:30 GMT
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).


---

Mime
View raw message