Instead of using True/False to signal success after possibly using
print() to actually write the result, we not just return either the
processed string, or None.
Michael Orlitzky [Thu, 15 Sep 2022 22:50:26 +0000 (18:50 -0400)]
bin/djbdns-logparse.py: move regex handling down a level.
It was a bit awkward to match a line against a regex, and then to have
to immediately pass that match object into a function that knows what
to do with it (to avoid duplicating work). Now the handle_tinydns_log()
and handle_dnscache_log() functions create the match object themselves,
and signal success or failure by returning a boolean.
Michael Orlitzky [Thu, 15 Sep 2022 02:53:37 +0000 (22:53 -0400)]
bin/djbdns-logparse.py: add some newer type mappings.
I've added srv, naptr, dnskey, tlsa, https, and caa type mappings
based on what my own logs contain. Only SRV is actually supported by
tinydns. There are probably others in use today that will show up
eventually.