When to use logging
Student Login

When to use logging

One of the astutely brilliant, distractingly sexy, ten-x developers on the Powerful Python newsletter asked:

"When should I use logging in my Python programs?"

This is a really good question. The short answer:

As often as you can.

After all... Logging is not as sexy as deep learning containerized blockchainz, or what ever is hot this week. But it's massively important for any software worth being proud of.

You really don't have to use logging for simple, small programs. Unless you just want to. But if you're writing a program you know will grow big enough to need logging...

You do yourself a favor to use it from the start.

Remember that logging is only as useful as the logging statements you put in your code.

When you insert logging calls early and often, then by the time you need them, your program will have a thorough set already installed... reporting heaps of useful information for troubleshooting, monitoring, and more.

Newsletter Bootcamp

Book Courses