6 Jan
2014
6 Jan
'14
9:56 p.m.
Wonder if there is a global debug logging function. If not, is it a good idea, and if so, where should we put it?
I was thinking of adding a function such as logdebug (or DEBUG, debug, etc?) in chirp_common.py that takes care of this, so that:
import os … if os.getenv("CHIRP_DEBUG"):
print "foo: %i, %s" % (var1, var2)
could become something like:
from chirp_common import logdebug … logdebug("foo: %i, %s" % (var1, var2))
Im guessing it should take standard print formats? Ideas/thoughts from pygurus on best practice for this?
-Jens