airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [airflow] larryzhu2018 commented on a change in pull request #7141: [AIRFLOW-6544] add log_id to end-of-file mark and also add an index config for logs
Date Wed, 15 Jan 2020 00:52:48 GMT
larryzhu2018 commented on a change in pull request #7141: [AIRFLOW-6544] add log_id to end-of-file
mark and also add an index config for logs
URL: https://github.com/apache/airflow/pull/7141#discussion_r366648976
 
 

 ##########
 File path: airflow/utils/log/es_task_handler.py
 ##########
 @@ -255,7 +256,9 @@ def close(self):
 
         # Mark the end of file using end of log mark,
         # so we know where to stop while auto-tailing.
-        self.handler.stream.write(self.end_of_log_mark)
+        if self.write_stdout:
+            print()
 
 Review comment:
   This is to make sure the "end-of-log" mark log record will always be in a separate line
therefore a separate log record. as those like us work with elastic search for logging, for
various reasons, it is not always easy to ensure log lines are not combined. Because the end-of-log
mark is so special, it helps with the print() here to guarantee that we can always find the
mark with the log-id from es_task_handler.py.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message