This is very long (but thorough!) article about implementing structured logging.
Shorter version: Use structured logging!
If using Python, use `structlog`: https://www.structlog.org/en/stable/
Shorter version: Use structured logging!
If using Python, use `structlog`: https://www.structlog.org/en/stable/
It can be tricky to forward all logs through it [0] but it's definitely worth it.
[0] https://www.structlog.org/en/stable/standard-library.html
I made this library to make global structured logging in Python super easy.