bujjibabukatta opened a new pull request, #71052: URL: https://github.com/apache/airflow/pull/71052
**Summary** Setting [logging] dag_processor_log_target = stdout was documented to disable file-based dag processor logs, but the logs/dag_processor directory kept growing regardless. **Root cause** _get_logger_for_dag_file() in manager.py unconditionally created and opened a log file for every dag file processed, regardless of dag_processor_log_target. The config only affected the subprocess's own stdout capture, not this separate file-based logger. **Fix** When dag_processor_log_target is "stdout", skip file creation entirely and use structlog.PrintLogger() instead. Updated processor.py's logger_filehandle to be Optional and guarded its close() call accordingly, since no file handle exists in that mode. closes: #70968 Was generative AI tooling used ? - [X] Yes - Claude Generated-by: Claude following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- 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]
