You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "bgalvao (via GitHub)" <gi...@apache.org> on 2025/10/21 08:15:18 UTC
Re: [I] [Task]: Add support for custom data for structured logging [beam]
bgalvao commented on issue #26460:
URL: https://github.com/apache/beam/issues/26460#issuecomment-3425349700
Hello, I would really like to have custom data for logging in the Python SDK.
I have tried [GCP's documented way of logging custom data](https://cloud.google.com/python/docs/reference/logging/latest/std-lib-integration#logging-json-payloads)...
```python
import logging
data_dict = {"hello": "world"}
logging.info("message field", extra={"json_fields": data_dict})
```
however this does not show up in the logs. Can someone from the Python SDK team help me figure out how to pass custom fields and have them persist in the logs?
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org