pingzh commented on a change in pull request #7141: [AIRFLOW-6544] add log_id 
to end_of_log mark log record
URL: https://github.com/apache/airflow/pull/7141#discussion_r369881195
 
 

 ##########
 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:
   Hi @larryzhu2018 for your description: 
   
![image](https://user-images.githubusercontent.com/8662365/72946940-52353080-3d35-11ea-9c3b-47996b94f47f.png)
   
   It looks like you have `write_stdout` as `true`, in fact, my pr: 
https://github.com/apache/airflow/pull/7199 fixed the always `true` for 
`write_stdout`.  could you please test the case when `write_stdout` is `False`.
   
   Our set up is:
   `write_stdout` is `False`
   `json` is `False`
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to