parent: log discard_until() input when IOLOG is enabled

Trying to diagnose a Reddit user's problem.
This commit is contained in:
David Wilson 2018-03-10 23:38:09 +05:45
parent 12c6e574fb
commit 8329bee889
1 changed files with 3 additions and 0 deletions

View File

@ -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