4 ms·
structlog
by seabrookmx 4y ago
structlog
- 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.
- raverbashing 4y agoYeah, it exists But IMO it inherited most of loggers problems while not offering a better interface It is basically a kwargs to json or 'key=value' converter (Also json logs are overrated. There I said it. Especially one key per line, please don't)
- funstuff007 4y agoagreed. one key per line is straight up madness. in general, your logs should not go out of their way to break grep.
- seabrookmx 4y agoThey're quite powerful if you aggregate in a tool like Splunk, ES, or GCloud logging. You need good quality logs though. Because noisy useless JSON logs are even more noisy and useless. Agreed on the one key per line bit.