jscheffl opened a new pull request, #38021: URL: https://github.com/apache/airflow/pull/38021
This PR is another "eye candy" for upcoming 2.9.0 release - and I hope I pass the review and merge if before release cut-off. Logging is usually a mass of text. Tasks/Operators generate a lot of text and it is hard to read and understand what is going on. Expertise need to be built-up. In our departments users are mostly over-whelmed with the logs in Airflow. A bit of filtering had been introduced but what I personally always was missing was a kind of log grouping which is existing in [Github](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#grouping-log-lines) or also [Azure DevOps Pipelines](https://learn.microsoft.com/en-us/azure/devops/pipelines/scripts/logging-commands?view=azure-devops&tabs=powershell#formatting-commands). This PR adds Log Grouping also to Airflow with the following effects: - Log grouping can be made with the same keywords like in Github or AzureDevOps - means that if users have scripts from these systems, they could be used in Airflow as well. Start a group with `::group::Some Headline` and end it with `::endgroup::` - Task instance runs automatically "fold" log details of task execution prior and post `execute()` method, making logs clean per default (showing only real business logic) - If a user un-folds a section, un-folding state is remembered in Grid view - Grouping is also working in old/legacy log view as well as Grid if the log is updated (auto-tail when task is running) Example, how do logs look like for the `example_params_trigger_ui` DAG: ![image](https://github.com/apache/airflow/assets/95105677/5718a2d1-70e6-4316-83bb-1c0ab104f47a) If you click on the blue colored log group header, the section un-folds: ![image](https://github.com/apache/airflow/assets/95105677/75f00c74-d9dc-453b-9a71-340e9afd44e3) One example added to `example_python_operator` DAG, prints are grouped giving the following results in the task logs: ![image](https://github.com/apache/airflow/assets/95105677/ad5d83dd-42c5-40fc-b23c-49fe3146b1a2) -- 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: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org