Logging: set the logger level to DEBUG.
Remove redundant condition checks.
Add some additional comments.
Add a TODO.
Whitespace cosmetics.
Logging: add a NullHandler if running Python 2.7+

Set its level to DEBUG.

This prevents warnings from being emitted if no appropriate loggers are
attached for a debug level and a debug message is generated.
Fix a comment typo.