anyapriya commented on PR #62258:
URL: https://github.com/apache/airflow/pull/62258#issuecomment-3952712816
> Looking at this more closely, this is not a valid way of logging
dictionaries.
>
> Since we use underneath stdlib logging, it will crash which is expected.
Running this:
>
> ```python
> import logging
>
> logging.basicConfig(level=logging.DEBUG)
> logger = logging.getLogger(__name__)
>
> logger.warning("Info message %s", {"a": 10})
> ```
>
> would crash too. The right way to log a dict would be:
`logger.warning("Info message %s", str({"a": 10}))`
@amoghrajesh Wait, I'm a little confused. You're saying this example should
fail, but it doesn't seem to when I test it out, screenshot below. Would be
curious if it's a version difference, or if I'm misunderstanding.
<img width="495" height="128" alt="Screenshot 2026-02-24 at 10 03 00 AM"
src="https://github.com/user-attachments/assets/45b57d98-e72a-4a98-88dd-4b829c1ae723"
/>
--
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]