Add option for default `log_source` setting in task logs web UI
- Dominant language
- Python
- Stars
- 46.9k
- Forks
- 17.8k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 472
Description
### Description
Currently, any task log page on the web UI shows a dropdown to select the log source, with the default always being `All Sources`.
Ideally it would be great if there were an Airflow config setting like `api.default_ui_log_source`, which may optionally be set to any one of the following standard options:
* `"operator"`
* `"task"`
* `"task.stderr"`
* `"All Sources"`
* `"airflow.plugins_manager"`
If the config is not set, then the `log_source` value in the web UI defaults to the `All Sources` option as it currently does in Airflow 3.1.8.
### Use case/motivation
For many of our users, the majority of the log sources emanating from the `"All Sources"` option are irrelevant, or confusing (for example, logs from the plugin manager bootstrapping are typically not useful to many data practictioners).
Also, it is common for much of the non-task log sources to be repeated across task instances and dag runs, regardless of the task or dag in question. Again, this is particularly true for things like plugin bootstrapping.
### Related issues
Not any that I'm aware of.
### Are you willing to submit a 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
Assessment
This issue has not been assessed yet.