RoyLee1224 commented on PR #56463:
URL: https://github.com/apache/airflow/pull/56463#issuecomment-3387931402

   ## Tested all styling
   
   <img width="1229" height="762" alt="light" 
src="https://github.com/user-attachments/assets/c2465a53-b478-4df8-b9b3-c7d29f9198f3";
 />
   <img width="1229" height="762" alt="dark" 
src="https://github.com/user-attachments/assets/6776530b-e5a4-473f-bec3-14adb0e7390c";
 />
   
   
   <details>
     <summary>Click for Example Code</summary>
   
         
         
         import logging
         from datetime import datetime
         
         from airflow.sdk import dag, task
         
         log = logging.getLogger(__name__)
         
         @dag(
             dag_id="color_log_reproduction_dag",
             start_date=datetime(2025, 1, 1),
             schedule=None,
             catchup=False,
         )
         
         
         def check_log_colors():
               
         
               @task
               def log_colored_messages():
                   """
                   Logs messages to test:
                   - Standard colors (30-37) → semantic tokens
                   - Bright colors (90-97) → specific color values  
                   - Text decorations (bold, italic, underline, etc.)
                   - Combinations of colors and decorations
                   """
         
                   log.info("--- Starting ANSI Color & Decoration Test ---")
         
                   # --- Standard Colors (30-37) ---
                   log.info("\033[30mBlack (gray-900)\033[0m")
                   log.info("\033[31mRed (red.fg)\033[0m")
                   log.info("\033[32mGreen (green.fg)\033[0m")
                   log.info("\033[33mYellow (yellow.fg)\033[0m")
                   log.info("\033[34mBlue (blue.fg)\033[0m")
                   log.info("\033[35mMagenta (purple.fg)\033[0m")
                   log.info("\033[36mCyan (cyan.fg)\033[0m")
                   log.info("\033[37mWhite (gray-100)\033[0m")
         
                   # --- Bright Colors (90-97) ---
                   log.info("\033[90mBright Black (black)\033[0m")
                   log.info("\033[91mBright Red (red-600)\033[0m")
                   log.info("\033[92mBright Green (green.400)\033[0m")
                   log.info("\033[93mBright Yellow (yellow.400)\033[0m")
                   log.info("\033[94mBright Blue (blue.400)\033[0m")
                   log.info("\033[95mBright Magenta (purple.400)\033[0m")
                   log.info("\033[96mBright Cyan (cyan.400)\033[0m")
                   log.info("\033[97mBright White (white)\033[0m")
         
                   # --- Text Decorations ---
                   log.info("\033[1mBold text (fontWeight: bold)\033[0m")
                   log.info("\033[2mDim text (opacity: 0.5)\033[0m")
                   log.info("\033[3mItalic text (fontStyle: italic)\033[0m")
                   log.info("\033[4mUnderlined text (textDecoration: 
underline)\033[0m")
                   log.info("\033[5mBlinking text (textDecoration: 
blink)\033[0m")
                   log.info("\033[7mReverse video text\033[0m")
                   log.info("\033[8mHidden text (visibility: hidden)\033[0m")
                   log.info("\033[9mStrikethrough text (textDecoration: 
line-through)\033[0m")
         
                   # --- Color + Decoration Combinations ---
                   log.info("\033[1;31mBold Red\033[0m")
                   log.info("\033[4;32mUnderlined Green\033[0m")
                   log.info("\033[3;34mItalic Blue\033[0m")
                   log.info("\033[1;4;33mBold Underlined Yellow\033[0m")
                   log.info("\033[2;35mDim Magenta\033[0m")
                   log.info("\033[9;36mStrikethrough Cyan\033[0m")
         
                   # --- Multiple Colors in Same Line ---
                   log.info("\033[31mRed\033[0m \033[32mGreen\033[0m 
\033[34mBlue\033[0m")
                   log.info("\033[1;91mBright Bold Red\033[0m and 
\033[4;94mUnderlined Bright Blue\033[0m")
         
                   # --- Complex Combinations ---
                   log.info("\033[1;3;4;31mBold Italic Underlined Red\033[0m")
                   log.info("\033[2;9;95mDim Strikethrough Bright 
Magenta\033[0m")
         
                   log.info("--- ANSI Color & Decoration Test Complete ---")
         
               log_colored_messages()
         
         check_log_colors()
   
   </details>
   


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