How to show the logging output from DockerOperator?

Viewed 1136

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?

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