airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Riccomini (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (AIRFLOW-1876) Subtask logs are not easily distinguised
Date Tue, 05 Dec 2017 19:24:00 GMT

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

Chris Riccomini resolved AIRFLOW-1876.
--------------------------------------
       Resolution: Fixed
    Fix Version/s: 1.10.0

> Subtask logs are not easily distinguised
> ----------------------------------------
>
>                 Key: AIRFLOW-1876
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-1876
>             Project: Apache Airflow
>          Issue Type: Improvement
>          Components: core
>            Reporter: William Pursell
>            Assignee: William Pursell
>            Priority: Minor
>             Fix For: 1.10.0
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Currently, when the scheduler is outputting all subtask logs to the same stream, it is
not easy to distinguish which logs come from which task.  It would be nice if there were some
convenient way to filter the logs from a given task.  For example, putting the task id after
the word 'Subtask'
> For example:
> diff --git a/airflow/task_runner/base_task_runner.py b/airflow/task_runner/base_task_runner.py
                                
> index bc0edcf3..e40f6ea9 100644                                
> --- a/airflow/task_runner/base_task_runner.py                  
> +++ b/airflow/task_runner/base_task_runner.py                  
> @@ -95,7 +95,11 @@ class BaseTaskRunner(LoggingMixin):         
>                  line = line.decode('utf-8')                   
>              if len(line) == 0:                                
>                  break                                         
> -            self.log.info(u'Subtask %s: %s', self._task_instance, line.rstrip('\n'))
                                         
> +            self.log.info(                                    
> +                u'Subtask %d: %s',                            
> +                self._task_instance.job_id,                   
> +                line.rstrip('\n')                             
> +            )                                                 
>                                                                
>      def run_command(self, run_with, join_args=False):         
>          """ 



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

Mime
View raw message