One way to write to the logs in Airflow is to return a string from a PythonOperator like on line 44 here.
Are there other ways that allow me to write to the airflow
You might use airflow logger
import logging logger = logging.getLogger("airflow.task") logger.error("Your custom error")