William Pursell created AIRFLOW-1876:
----------------------------------------
Summary: 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
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)