adeutscher / DirectoryTools

0 stars 0 forks source link

Organize debug levels #19

Closed adeutscher closed 10 years ago

adeutscher commented 10 years ago

I need to think up a better description for the debug levels than "debug level X", and adjust the printDebug calls accordingly.

adeutscher commented 10 years ago

While we're at it, we should also change the print statements to use the logging module.

Recently read http://blog.tplus1.com/blog/2007/09/28/the-python-logging-module-is-much-better-than-print-statements/ (Thanks Reddit!), and the sample in this blog post is enough to make me swear off using print statements for the most part.

Notes:

adeutscher commented 10 years ago

Switched logging over to using Python's logging module.

Added a method to help people unfamiliar with the module to enable stdout, but choosing further logging destinations will be the user's responsibility.