News for hackers. Stuff that matters.
Re:Logging in Python like a pro by Jamie9912 on Friday July 01, 2022 @01:37PM (#31949897)
loguru perhaps
Re:Logging in Python like a pro by linsomniac on Friday July 01, 2022 @09:04PM (#31954987)
A 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. :-)

Re:Logging in Python like a pro by sage92 on Friday July 01, 2022 @04:30PM (#31952408)
This is the only library I that both can use out of the box and extend to my needs.
Re:Logging in Python like a pro by charlieyu1 on Friday July 01, 2022 @09:35PM (#31955193)
One 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
Re:Logging in Python like a pro by kortex on Friday July 01, 2022 @10:31PM (#31955541)
What 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.