tirkarthi opened a new pull request, #46820:
URL: https://github.com/apache/airflow/pull/46820

   We extensively use log grouping in Airflow 2. While looking at 
implementation of grouping through a prism plugin to support colors I found 
about `<details>` and `<summary>` tag which  has good browser support 
supporting almost all browsers in last 5 years. 
   
   The implementation is to keep the group name under `<details>` and to have 
the group's log content under `<summary>` section which can be clicked to 
expand like Airflow 2. The PR involves looking for "::group::" in the log line 
to indicate the log group start marker and collect the subsequent lines till 
line with "::endgroup::" is reached and wrap them up in the `<details>` tag as 
a section. The code logic and styling around this can be improved but I felt 
this is a good enough to open a PR for discussion. This also makes the 
implementation simpler compared to Airflow 2.
   
   Docs : https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details
   
   Notes to reviewer and self 
   
   1. It seems "::group::<name>" is the documented approach though code also 
supports "##group##<name>" . Do we need to support this? 
   2. I just used split string by "::group::" and capture the part after marker 
as name instead of regex to extract group name for simplicity but it can be 
made as a regex.
   
   
![image](https://github.com/user-attachments/assets/6ff33886-bc12-4c60-b47b-d946664cac6c)
   


-- 
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]

Reply via email to