Open hmaerki opened 1 month ago
The original idea, as I remember it from years ago, was that the purpose of the debug variable was to control whether specific debugging routines were executed at all.
If debug is not active, these routines don’t run, so there's no overhead. However, if these routines were to send their output through the standard Python logging function, the logging call would still be made, even if nothing is actually displayed.
This means the debugging code would still run, adding unnecessary processing when not in use.
g.debug
/meterbus.debug(True)
may be archived using python logging. In a central point, the loglevels may be controlled.Would it be better to trash 'g.debug' and just use python logging?