Owen-CH-Leung opened a new pull request, #32781: URL: https://github.com/apache/airflow/pull/32781
Fixes #23967 Original code use `log_directory` defined in `airflow.cfg` even though another `base_log_folder` is defined in logging config. This PR adds logic to attempt to override `log_directory` if `logging_config_class` and `base_log_folder` are both defined, and fall back to original default log directory if they don't How to test if it works: 1. execute `breeze start-airflow --executor CeleryExecutor --backend postgres --load-example-dags --db-reset` 2. go to `$AIRFLOW_HOME`, create a directory called `config`, and create an empty `__init__.py` and `log_config.py` file inside 3. Inside `airflow/config_templates/airflow_local_settings.py`, modify `DEFAULT_LOGGING_CONFIG[handlers][task][base_log_folder]` to some other different locations 4. copy all the contents inside `airflow/config_templates/airflow_local_settings.py` into `log_config.py` 5. In `/root/airflow/airflow.cfg` , under `logging` section, modify `logging_config_class` to `log_config.DEFAULT_LOGGING_CONFIG` 6. Restart everything 7. Run a DAG in webUI, check the log, and you should be about to see the logs are served. 8. Go to the location that you defined in step 3, and you should see the dag 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
