[chirp_devel] debug logging function?

Jens J.
Mon Jan 6 21:56:06 PST 2014


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://intrepid.danplanet.com/pipermail/chirp_devel/attachments/20140106/4dffa32d/attachment-0001.html 


More information about the chirp_devel mailing list