r/pythontips • u/pylenin • Jun 01 '19
Simple Guide to Python Logging
Printing stuff is useful. But is it enough?
In this video, I try to throw light on situations where it is advantageous to use Python Logging over print.
Check it out here.
37
Upvotes
1
u/billsil Oct 27 '19
There are a few things that bug me about logging. Errors in messages are thrown away instead of causing a crash. Starting and stopping logs frequently leads to double logging. It also doesn’t support colorama or html output.
That’s why I wrote cpylog. It knows if say you’re running from the jupyter notebook or a terminal and adjusts how the output will look based on that.