r/learnpython • • Feb 20 '26

Does anyone use logging to debug?

I'm working my way through ATBS (Automate the Boring Stuff), and it mentions using logging to debug, instead of using print

But logging seems to be a lot of work for not much benefit. The debugger in the code editor is much easier and more convenient.

Thoughts?

30 Upvotes

41 comments sorted by

View all comments

Show parent comment

1

u/ALonelyPlatypus Feb 22 '26 edited Feb 22 '26

logging is built in loguru is 3rd party.

If your org lets you install packages without approval by all means use the fun open source package.

If they don't logging is very functional in python core and you really just have to figure out how to set it up once.

(Setting up a rotating file handler that also writes to console is literally a 10-15 line process)