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 2019/12/08 22:43:20 UTC
[GitHub] [airflow] mik-laj commented on a change in pull request #6211:
[AIRFLOW-5569] Improve Pod Launcher Logging
mik-laj commented on a change in pull request #6211: [AIRFLOW-5569] Improve Pod Launcher Logging
URL: https://github.com/apache/airflow/pull/6211#discussion_r355220834
##########
File path: airflow/kubernetes/pod_launcher.py
##########
@@ -124,14 +124,14 @@ def _monitor_pod(self, pod: V1Pod, get_logs: bool) -> Tuple[State, Optional[str]
if get_logs:
logs = self.read_pod_logs(pod)
for line in logs:
- self.log.info(line)
+ self.log.info("Log: %s", line.decode().rstrip())
Review comment:
We should decode output. Otherwise it will be displayed in an ugly way.
```
[2019-08-29 11:06:04,975] {pod_launcher.py:106} INFO - b'\n'
[2019-08-29 11:06:04,976] {pod_launcher.py:106} INFO - b'Loading DB routines from perl5db.pl version 1.55\n'
[2019-08-29 11:06:04,977] {pod_launcher.py:106} INFO - b'Editor support available.\n'
[2019-08-29 11:06:04,977] {pod_launcher.py:106} INFO - b'\n'
[2019-08-29 11:06:04,978] {pod_launcher.py:106} INFO - b"Enter h or 'h h' for help, or 'man perldebug' for more help.\n"
[2019-08-29 11:06:04,979] {pod_launcher.py:106} INFO - b'\n'
[2019-08-29 11:06:04,979] {pod_launcher.py:106} INFO - b'main::(-e:1):\t0\n'
[2019-08-29 11:06:04,981] {pod_launcher.py:106} INFO - b' DB<1> '
```
I removed prefix "Log:"
----------------------------------------------------------------
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