def dlog(msg, log_path=DEFAULT_LOG_PATH):
  """A handy log utility for debugging multi-process, multi-threaded activities."""
  with open(log_path, 'a') as f:
    f.write('\n{}@{}: {}'.format(os.getpid(), threading.current_thread().name, msg))