<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:10pt"><div>Wonder if there is a global debug logging function. If not, is it a good idea, and if so, where should we put it?</div><div><br></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;">I was thinking of adding a function such as logdebug (or DEBUG, debug, etc?) in chirp_common.py that takes care of this,</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;">so that:</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="background-color: transparent;"><span style="font-family: 'lucida console', sans-serif;">import os</span></div><div><span style="font-family: 'lucida console', sans-serif;">…</span></div><div><span style="font-family: 'lucida console', sans-serif;">if os.getenv("CHIRP_DEBUG"):<br></span></div><div><span style="font-family: 'lucida console', sans-serif;"> print "foo: %i, %s" % (var1, var2)</span></div><div><br></div><div>could become something like:</div><div><br></div><div><span style="font-family: 'lucida console', sans-serif;">from chirp_common import logdebug</span></div><div style="color: rgb(0, 0, 0); font-size: 13px; background-color: transparent; font-style: normal;"><span style="font-family: 'lucida console', sans-serif;">…</span></div><div style="color: rgb(0, 0, 0); font-size: 13px; background-color: transparent; font-style: normal;"><span
style="font-family: 'lucida console', sans-serif;">logdebug("foo: %i, %s" % (var1, var2))</span></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;">Im guessing it should take standard print formats?</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;">Ideas/thoughts from pygurus on best practice for this?</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;">-Jens</div></div></body></html>