nifi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Zhurakousky (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (NIFI-1216) NiFi framework spends resources formatting log messages for Processor Loggers even when log level disabled
Date Wed, 25 Nov 2015 14:42:11 GMT

    [ https://issues.apache.org/jira/browse/NIFI-1216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15026861#comment-15026861
] 

Oleg Zhurakousky edited comment on NIFI-1216 at 11/25/15 2:42 PM:
------------------------------------------------------------------

Minor stylistic comment; Personally I'd go checking if "true" 
{code}
@Override
 public void warn(String msg, final Throwable t) {
       if (isWarnEnabled()){
          // logging logic
       }
}

Other then that LGTM.


was (Author: ozhurakousky):
Minor stylistic comment; Personally I'd go for 'if (true) {logging logic}' instead of 'if
(false){return}'.
Other then that LGTM.

> NiFi framework spends resources formatting log messages for Processor Loggers even when
log level disabled
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: NIFI-1216
>                 URL: https://issues.apache.org/jira/browse/NIFI-1216
>             Project: Apache NiFi
>          Issue Type: Bug
>            Reporter: Mark Payne
>            Assignee: Mark Payne
>             Fix For: 0.4.0
>
>         Attachments: 0001-NIFI-1216-Check-if-log-level-is-enabled-immediately-.patch
>
>
> Currently when we call getLogger().info(...) the log message is formatted, even if the
log level is set to WARN or ERROR. This is fairly expensive and can be avoided.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message