import re, typing
from struct import pack
-from time import strftime, gmtime
-
## Regular expressions for matching tinydns/dnscache log lines. We
## compile these once here rather than within the corresponding
elif event in ("tcpopen", "tcpclose"):
decode_client(words, 0)
- return f"{timestamp} {event} " + " ".join(words)
+ # Reconstitute "data" (i.e. everything after the timestamp and the
+ # event) from "words", which was originally obtained by splitting
+ # "data".
+ data = " ".join(words)
+ return f"{timestamp} {event} {data}"