Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show the logging output from DockerOperator?

Tags:

airflow

I have a DockerOperator working but airflow does not show any logging statement of my DockerOperator like it did for PythonOperator or BashOperator when I run it with "airflow test". However I can see the logging statements the same task is run. How would I made the logger visible for "airflow test" as well?

like image 206
Sam Avatar asked Sep 14 '18 00:09

Sam


1 Answers

Adding the following to my execution module displayed the logs in the DockerOperator for me.

import logging
import sys

logging.basicConfig(stream=sys.stdout, level=logging.INFO)
like image 115
staten12 Avatar answered Sep 21 '22 14:09

staten12