Repository navigation
Description
Under which category would you file this issue?
Airflow Core
Apache Airflow version
3.3.0
What happened and how to reproduce it?
Goal
Completely disable file-based logs from dag processor.
Context
I Run airflow. I Notice that dag_processor creates many logs under /opt/airflow/logs/dag_processor. In fact, this directory eventually grows multiple GBs large and eats all available space.
I can create some log rotator / archiver, but in fact I do not need the dag_processor logs at all so I would very much prefer to deactivate them completely.
What I tried
- Setting
[logging] --> dag_processor_log_target = stdoutand restarted airflow. Intuitively I would expect that this would work, but unfortunately the directory still being created and filled with multiple MBs per day.
A sample from the files I see:
{"timestamp":"2026-08-03T00:23:28.159066Z","level":"info","event":"Filling up the DagBag from /opt/airflow/dags/purchases/purchases_batch_prices_sync.py","dag_file":"purchases/purchases_batch_prices_sync.py","bundle_name":"dags-folder","logger":"airflow.dag_processing.dagbag.BundleDagBag","filename":"dagbag.py","lineno":460}
{"timestamp":"2026-08-03T00:23:28.163495Z","level":"warning","event":"The airflow.security.permissions module is deprecated; please see https://airflow.apache.org/docs/apache-airflow/stable/security/deprecated_permissions.html","dag_file":"purchases/purchases_batch_prices_sync.py","bundle_name":"dags-folder","category":"UserWarning","filename":"<attrs generated methods airflow.sdk.definitions.dag.DAG>","lineno":96,"logger":"py.warnings"}
{"timestamp":"2026-08-03T00:23:58.281367Z","level":"info","event":"Filling up the DagBag from /opt/airflow/dags/purchases/purchases_batch_prices_sync.py","dag_file":"purchases/purchases_batch_prices_sync.py","bundle_name":"dags-folder","logger":"airflow.dag_processing.dagbag.BundleDagBag","filename":"dagbag.py","lineno":460}
{"timestamp":"2026-08-03T00:23:58.286175Z","level":"warning","event":"The airflow.security.permissions module is deprecated; please see https://airflow.apache.org/docs/apache-airflow/stable/security/deprecated_permissions.html","dag_file":"purchases/purchases_batch_prices_sync.py","bundle_name":"dags-folder","category":"UserWarning","filename":"<attrs generated methods airflow.sdk.definitions.dag.DAG>","lineno":96,"logger":"py.warnings"}
{"timestamp":"2026-08-03T00:24:28.471662Z","level":"info","event":"Filling up the DagBag from /opt/airflow/dags/purchases/purchases_batch_prices_sync.py","dag_file":"purchases/purchases_batch_prices_sync.py","bundle_name":"dags-folder","logger":"airflow.dag_processing.dagbag.BundleDagBag","filename":"dagbag.py","lineno":460}
{"timestamp":"2026-08-03T00:24:28.475547Z","level":"warning","event":"The airflow.security.permissions module is deprecated; please see https://airflow.apache.org/docs/apache-airflow/stable/security/deprecated_permissions.html","dag_file":"purchases/purchases_batch_prices_sync.py","bundle_name":"dags-folder","category":"UserWarning","filename":"<attrs generated methods airflow.sdk.definitions.dag.DAG>","lineno":96,"logger":"py.warnings"}
{"timestamp":"2026-08-03T00:24:59.339487Z","level":"info","event":"Filling up the DagBag from /opt/airflow/dags/purchases/purchases_batch_prices_sync.py","dag_file":"purchases/purchases_batch_prices_sync.py","bundle_name":"dags-folder","logger":"airflow.dag_processing.dagbag.BundleDagBag","filename":"dagbag.py","lineno":460}
{"timestamp":"2026-08-03T00:24:59.343819Z","level":"warning","event":"The airflow.security.permissions module is deprecated; please see https://airflow.apache.org/docs/apache-airflow/stable/security/deprecated_permissions.html","dag_file":"purchases/purchases_batch_prices_sync.py","bundle_name":"dags-folder","category":"UserWarning","filename":"<attrs generated methods airflow.sdk.definitions.dag.DAG>","lineno":96,"logger":"py.warnings"}
What you think should happen instead?
Setting dag_processor_log_target = stdoutshould meain no logs written to the file system
Operating System
docker container
Deployment
Docker-Compose
Apache Airflow Provider(s)
No response
Versions of Apache Airflow Providers
No response
Official Helm Chart version
Not Applicable
Kubernetes Version
No response
Helm Chart configuration
No response
Docker Image customizations
Only mounting some volumes (/opt/airflow/logs/ being one of them) and pip installing "apache-airflow-providers-oracle"
Anything else?
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Activity
takayoshi-makabe commentedon Aug 3, 2026
dag_processor_log_targetwas originally added in 2.4.0 (#25754) as a genuine exclusive switch: theairflow.processorlogger's Python logging handler was swapped between a file handler and a stdout handler, so setting it tostdoutmeant no file was ever created.When the Dag File Processor was rewritten onto the Task SDK's subprocess/structlog architecture (around 3.0/3.1), that handler-swap mechanism was dropped entirely, and the config option silently stopped doing anything.
#65528 (merged 2026-04-20) reconnected the option, but wired it into the
subprocess_logs_to_stdoutflag that already existed for task logs. That flag is intentionally additive for task logs — it duplicates output to stdout while always keeping the file, which makes sense there because task logs are served via the Log API and can be uploaded to remote storage, so the file is load-bearing.Dag processor logs have neither of those dependencies (no API/UI route serves them, and they're never uploaded to remote storage), so there's no structural reason to force a file write when
dag_processor_log_target = stdout. The current behavior (always write the file, optionally also duplicate to stdout) matches what #65528 intended for containers, but doesn't restore the original exclusive semantics that the config's own docs still describe ("Where to send dag parser logs. If 'file', logs are sent to log files...").Drafted-by: Claude Code (Sonnet 5); reviewed by @takayoshi-makabe before posting
takayoshi-makabe commentedon Aug 3, 2026
A couple of other options, since #65528 was a recent maintainer decision that some users may already rely on:
alkismavridis commentedon Aug 3, 2026
The ability to deactivate file-based logs would be highly appreciated 🙏
Especially for those who run airflow inside docker containers, stdout is absolutely enough since our underlying docker infrastructure already deals with rotations, archivings etc. And as far as I understand it, other airflow components such as the triggerer or scheduler do not create file logs, so the dag processor seems to behave differently here. Please correct me if I am wrong on that point.