You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/01/14 11:42:20 UTC

[GitHub] [airflow] andriisoldatenko 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

andriisoldatenko 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_r366292158
 
 

 ##########
 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()
+        self.handler.emit(logging.makeLogRecord({'msg': self.end_of_log_mark}))
 
 Review comment:
   pls review [AIRFLOW-5528] (end_of_log_mark should not be a log record (#6159) 
   where @pingzh changed this line:
   ```diff
   - self.handler.emit(logging.makeLogRecord({'msg': self.end_of_log_mark}))
   + self.handler.stream.write(self.end_of_log_mark)
   ```

----------------------------------------------------------------
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