Commit cb620500 authored by David Wilson's avatar David Wilson

issue #131: log stack and PPID with MITOGEN_ROUTER_DEBUG=1

parent 0f5a31fb
......@@ -217,6 +217,8 @@ def enable_debug_logging():
root.setLevel(logging.DEBUG)
IOLOG.setLevel(logging.DEBUG)
fp = open('/tmp/mitogen.%s.log' % (os.getpid(),), 'w', 1)
fp.write('Parent PID: %s\n' % (os.getppid(),))
fp.write('Created by:\n\n%s\n\n' % (''.join(traceback.format_stack()),))
set_cloexec(fp.fileno())
handler = logging.StreamHandler(fp)
handler.formatter = logging.Formatter(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment