3 ms·
This is very long (but thorough!) article about implementing structured logging. Shorter version: Use structured logging! If using Python, use `structlog`: ht
by jasonpeacock 4y ago
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/ https://www.structlog.org/en/stable/
- timost 4y agoI agree, structlog is such a quality of life improvement. 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 https://www.structlog.org/en/stable/standard-library.html
- jteppinette 4y agohttps://github.com/jteppinette/python-logfmter https://github.com/jteppinette/python-logfmter I made this library to make global structured logging in Python super easy.
- delijati 4y agoYou always need some boilerplate to get structlog working. I always use this (author) to have the needed defaults https://github.com/peakiq/logma https://github.com/peakiq/logma.
- matheusmoreira 4y agoThank you so much for posting this. Very well designed library. I wish logging worked like this on every language.