I am running a local docker of Astronomer. I would like to maintain logs just for one day across all components. I was able to restart the instance using docker compose entry of AIRFLOW__CORE__MAX_LOG_AGE_IN_DAYS=1, that I see listed under section [core] of the Admin->Configuration as max_log_age_in_days with a value of 1.
When will this take effect, and if it does, will it delete all logs more than a day old?
AIRFLOW__CORE__MAX_LOG_AGE_IN_DAYS=1 setting in your docker compose file will take effect immediately after you restart your Airflow instance. This setting controls the maximum number of days to retain task logs. Airflow will automatically clean up the logs that are older than this number of days.
For scheduler or webserver logs in Docker, use Docker’s
--log-opt flag to control the maximum size and file count of the logs or set this in your Docker compose file.