watchforstock / evohome-client

Python client to access the Evohome web service
Apache License 2.0
88 stars 52 forks source link

Improve debug #73

Closed zxdavb closed 5 years ago

zxdavb commented 5 years ago

The existing code has the following (rather useful) block that is executed during initialization:

if debug = True:
    turn_debug_logging_on()
else:
    turn_debug_logging_off()

Turning debug logging on is useful, but not turning it on shouldn't mean that it be turned off.

For example, I use this component in a smarthome platform, and it has a means to configure logging of it's components, libraries, etc. in a single log file. The existing code overrules this behaviour.

Here, I am proposing:

if debug = True:
    turn_debug_logging_on()

If debug is not true, then the debugging may still occur according to the expected behavior of logger

zxdavb commented 5 years ago

woops! no git fetch --all!