Add a new --debug-pids option.

This makes the helpers.* log functions prepend getpid() to each line, so you
can see which pid did what.
This commit is contained in:
Avery Pennarun 2010-11-22 01:50:46 -08:00
commit 501b534308
3 changed files with 8 additions and 2 deletions

View file

@ -35,8 +35,10 @@ def mkdirp(d, mode=None):
def log_(s):
sys.stdout.flush()
sys.stderr.write(s)
#sys.stderr.write('%d %s' % (os.getpid(), s))
if vars.DEBUG_PIDS:
sys.stderr.write('%d %s' % (os.getpid(), s))
else:
sys.stderr.write(s)
sys.stderr.flush()