Airflow 3.0.6 ignores logging settings, only outputs to STDOUT
- Dominant language
- Python
- Stars
- 46.9k
- Forks
- 17.8k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 483
Description
### Apache Airflow version
3.0.6
### If "Other Airflow 2 version" selected, which one?
_No response_
### What happened?
This is a new install. Despite any settings in the config OR the command-line, I can't get it to log anywhere but stdout.
In the config:
logging_level = WARN
fab_logging_level = WARN
base_log_folder = /airflow/logs/
[logging]
base_log_folder = /airflow/logs
logging_level = DEBUG
logging_level = WARN
Tried: ExecStart=/bin/bash -c 'export AIRFLOW_HOME=/airflow ; source /airflow/airflow_env/bin/activate && /airflow/airflow_env/bin/airflow api-server -l /airflow/logs/api-server.log'
Also tried:
ExecStart=/airflow/airflow_env/bin/airflow api-server -D --access-logfile /airflow/logs/webserver_access.log --stderr /airflow/logs/webserver_error.log
Also tried:
ExecStart=/airflow/airflow_env/bin/airflow api-server -A /airflow/logs/api-server.log --access-logfile /airflow/logs/webserver_access.log --stderr /airflow/logs/webserver_error.log
The only output is stdout. Running it from systemd dumps this in /var/log/messages and it's very difficult to parse and read
### What you think should happen instead?
Doesn't comply with documentation.
### How to reproduce
In the config:
logging_level = WARN
fab_logging_level = WARN
base_log_folder = /airflow/logs/
[logging]
base_log_folder = /airflow/logs
logging_level = DEBUGlogging_level = WARN
Tried: ExecStart=/bin/bash -c 'export AIRFLOW_HOME=/airflow ; source /airflow/airflow_env/bin/activate && /airflow/airflow_env/bin/airflow api-server -l /airflow/logs/api-server.log'
Also tried:
ExecStart=/airflow/airflow_env/bin/airflow api-server -D --access-logfile /airflow/logs/webserver_access.log --stderr /airflow/logs/webserver_error.log
Also tried:
ExecStart=/airflow/airflow_env/bin/airflow api-server -A /airflow/logs/api-server.log --access-logfile /airflow/logs/webserver_access.log --stderr /airflow/logs/webserver_error.log
The only output is stdout. Running it from systemd dumps this in /var/log/messages and it's very difficult to parse and read
### Operating System
alma Linux 9
### Versions of Apache Airflow Providers
_No response_
### Deployment
Virtualenv installation
### Deployment details
_No response_
### Anything else?
_No response_
### Are you willing to submit PR?
- [x] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
Contributor guide
Research direction
No source file or test is named. Start by reproducing the api-server behavior with the shown configuration and command-line options under systemd, then trace the api-server logging entry point and its documented flags. Done means the configured logging level and file destinations are honored instead of all output going to stdout.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100