You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2016/10/27 07:27:58 UTC
[jira] [Commented] (AIRFLOW-580) Disable Logging String Formatting
Style Warning in Landscape.io
[ https://issues.apache.org/jira/browse/AIRFLOW-580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15611022#comment-15611022 ]
ASF subversion and git services commented on AIRFLOW-580:
---------------------------------------------------------
Commit 1aa241d8409b8f1645a8ac763d94b150e492e192 in incubator-airflow's branch refs/heads/master from [~robin.miller@affiliate.oliverwyman.com]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-airflow.git;h=1aa241d ]
[AIRFLOW-580] Prevent landscape warning on .format
Prevent landscape warning for use of .format in logging
Closes #1843 from robin-miller-ow/DisableLoggingSt
ringFormattingStyleWarningInLandscapeIO
> Disable Logging String Formatting Style Warning in Landscape.io
> ---------------------------------------------------------------
>
> Key: AIRFLOW-580
> URL: https://issues.apache.org/jira/browse/AIRFLOW-580
> Project: Apache Airflow
> Issue Type: Improvement
> Components: logging
> Environment: CI
> Reporter: Robin Miller
> Assignee: Robin Miller
> Priority: Trivial
> Labels: CI
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> After a change relating to logging, the Landscape.io formatting checks produced the warning: "Use % formatting in logging functions and pass the % parameters as arguments"
> This occurred on any lines of the form:
> _log.info("Some string with {} in".format(variable))
> After a look around the code to identify the norm, it seems there are a lot of lines like this. Discussion on the dev email list brought up the following points:
> - New style formatting is preferred for reading code.
> - Old style formatting allows for a slight performance gain in the situation where the log message is ignored due to the logging level, as it can skip interpolation.
> - This performance gain is likely to be very small for our use case.
> As such I propose the addition of "logging-format-interpolation" to the pylint disable list in the .landscape.yml file.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)