You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Ash Berlin-Taylor (JIRA)" <ji...@apache.org> on 2017/12/15 18:33:00 UTC

[jira] [Comment Edited] (AIRFLOW-1931) Importing airflow module shouldn't affect logging config

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

Ash Berlin-Taylor edited comment on AIRFLOW-1931 at 12/15/17 6:32 PM:
----------------------------------------------------------------------

For example

{noformat}
building [html]: targets for 1 source files that are out of date
updating environment: 0 added, 1 changed, 0 removed
Reading the config from /root/airflow/airflow.cfg
[2017-12-15 18:31:22,599] {logging.py:97} INFO -
[2017-12-15 18:31:22,600] {logging.py:97} INFO - looking for now-outdated files...
[2017-12-15 18:31:22,600] {logging.py:97} INFO - none found
[2017-12-15 18:31:22,601] {logging.py:97} INFO - pickling environment...
{noformat}


was (Author: ashb):
For example

{{forformat}}
building [html]: targets for 1 source files that are out of date
updating environment: 0 added, 1 changed, 0 removed
Reading the config from /root/airflow/airflow.cfg
[2017-12-15 18:31:22,599] {logging.py:97} INFO -
[2017-12-15 18:31:22,600] {logging.py:97} INFO - looking for now-outdated files...
[2017-12-15 18:31:22,600] {logging.py:97} INFO - none found
[2017-12-15 18:31:22,601] {logging.py:97} INFO - pickling environment...
{{noformat}}

> Importing airflow module shouldn't affect logging config
> --------------------------------------------------------
>
>                 Key: AIRFLOW-1931
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-1931
>             Project: Apache Airflow
>          Issue Type: Improvement
>    Affects Versions: 1.9.0
>            Reporter: Ash Berlin-Taylor
>            Priority: Minor
>             Fix For: 2.0.0
>
>
> Right now simply importing the airflow main module will alter the logging config, which leads to some strange interactions with other python modules.
> (One such example is sphinx autodoc where half the lines are in one logging format, and half are in airflow's style after it gets loaded by autodoc.)
> It would be nice if we only used airflow's logging format from within airflow.bin.cli.
> More generally this might also be achieved by doing less at the top level of modules (for instance importing airflow.configuration will end up creating dirs on the filesystem.)
> None of this is a disaster or a bug, it's just a bit tiny bit annoying when you use airflow programatically



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)