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

   ### Problem
   Currently, the code assigns the log level directly to the `.level` attribute.
   This violates the [official Python 
documentation](https://docs.python.org/3/library/logging.html#logging.Logger.level),
 which explicitly states:
   - Note: Do not set this attribute directly - always use `setLevel()`, which 
has checks for the level passed to it.
   
   This direct assignment bypasses the Python logging module's 
`_invalidate_cache()` mechanism. If the root logger was previously initialized 
with a different level (e.g., WARNING), the stale cache persists. This causes 
logs (e.g., INFO) to be suppressed during task execution even after the level 
update.
   
   ### Solution
   So, I changed the assignment to use the standard method `.setLevel()`.
   This ensures the internal cache is cleared via `_invalidate_cache()` and the 
new level takes effect immediately.


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