From 8329bee889c539804e2aca763f6ebe68c29afe1b Mon Sep 17 00:00:00 2001 From: David Wilson Date: Sat, 10 Mar 2018 23:38:09 +0545 Subject: [PATCH] parent: log discard_until() input when IOLOG is enabled Trying to diagnose a Reddit user's problem. --- mitogen/parent.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mitogen/parent.py b/mitogen/parent.py index bd659fde..829a0ca7 100644 --- a/mitogen/parent.py +++ b/mitogen/parent.py @@ -215,6 +215,9 @@ def iter_read(fd, deadline=None): def discard_until(fd, s, deadline): for buf in iter_read(fd, deadline): + if IOLOG.level == logging.DEBUG: + for line in buf.splitlines(): + IOLOG.debug('discard_until: discarding %r', line) if buf.endswith(s): return