5 ms·
Are there any good 3rd party alternatives that work better?
by drzoltar 4y ago
Are there any good 3rd party alternatives that work better?
- Jamie9912 4y agologuru perhaps
- sage92 4y agoThis is the only library I that both can use out of the box and extend to my needs.
- linsomniac 4y agoA few months ago I built a project and wanted to add logging. After searching around, I ended up selecting loguru and it definitely is a nicer user experience. But I also didn't really love it, for reasons that I don't recall now. I would look to it again, simply for lack of a better choice. Sadly, my social media is subscribed to by pretty heavy hitters in the Python community, but when I asked about the best logging for python it was all crickets. Maybe that says something. :-)
- charlieyu1 4y agoOne missing feature of loguru is filter by logging levels. You can still get around it by modifying an internal variable that you can specifically not to
- kortex 4y agoWhat do you mean? You just add a custom handler. It's like a few lines to write a handler that does some action on specific levels.
- seabrookmx 4y agostructlog
- 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.
- wheelerof4te 4y agoNot sure about 3rd party, but I know another built-in one. print(f"log_func: {var_a} not found!")
- selcuka 4y agoPro tip: Try {var_a=} instead.