zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jackie Chang (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (ZOOKEEPER-1766) Consistent log severity level guards and statements
Date Thu, 26 Sep 2013 04:28:04 GMT

     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jackie Chang updated ZOOKEEPER-1766:
------------------------------------

    Description: 
A log statement should be guarded by its matching severity level. A log statement like

     if (LOG.isTraceEnabled()) {
       LOG.debug(identifier + " opening connection to ZooKeeper ensemble=" + ensemble);

doesn't make much sense because the log message is only printed out when TRACE-level is enabled.
This inconsistency was possibly introduced when developers demoted the original log statement
from DEBUG but forgot to change its corresponding log severity level.
    
> Consistent log severity level guards and statements
> ---------------------------------------------------
>
>                 Key: ZOOKEEPER-1766
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1766
>             Project: ZooKeeper
>          Issue Type: Improvement
>            Reporter: Jackie Chang
>         Attachments: ZOOKEEPER-1766.patch
>
>
> A log statement should be guarded by its matching severity level. A log statement like
>      if (LOG.isTraceEnabled()) {
>        LOG.debug(identifier + " opening connection to ZooKeeper ensemble=" + ensemble);
> doesn't make much sense because the log message is only printed out when TRACE-level
is enabled. This inconsistency was possibly introduced when developers demoted the original
log statement from DEBUG but forgot to change its corresponding log severity level.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message