Haapalaj commented on issue #59634:
URL: https://github.com/apache/airflow/issues/59634#issuecomment-3685509842

   > From a quick look, this seems to stem from the logging isolation 
introduced in Airflow 3 / Task SDK, where only task-scoped loggers `(self.log)` 
are guaranteed to be captured. Module-level loggers that worked in 2.x can now 
fail silently during task execution.
   > 
   > While this is arguably expected behavior, the silent log loss is pretty 
surprising from a DX standpoint, especially for users migrating from 2.x. At 
minimum, it feels like we should guide users when this happens (e.g. a runtime 
warning or clearer documentation), rather than dropping logs with no signal.
   > 
   > I’m happy to take a stab at improving this, if that direction sounds 
reasonable.
   
   Thanks!
   So would it be that for task logging, either use:
   ```
   from airflow.utils.log.logging_mixin import LoggingMixin
   LOG = LoggingMixin().log
   ```
   Or
   `self.log`
   I would prefer to have option to use the same way as woth the Airflow 2.x


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