]> gitweb.michael.orlitzky.com - djbdns-logparse.git/commitdiff
bin/djbdns-logparse: fix line splitting in tinydns output.
authorMichael Orlitzky <michael@orlitzky.com>
Thu, 15 Sep 2022 00:51:00 +0000 (20:51 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Thu, 15 Sep 2022 00:51:00 +0000 (20:51 -0400)
bin/djbdns-logparse

index 32c7ba106139916df2cd0241c2e50956e824e815..76522c5c0e9c886762eb0e01a40613cd5bf43c8f 100755 (executable)
@@ -194,7 +194,7 @@ def handle_tinydns_log(line, match):
     type = int(type, 16)                # "001c" -> 28
     type = query_type.get(type, type)   # 28 -> "aaaa"
 
-    print(timestamp,)
+    print(timestamp, end=' ')
 
     if code == "+":
         print ("sent response to %s:%s (id %s): %s %s"
@@ -231,7 +231,7 @@ def parse_logfile(file):
             handle_dnscache_log(line, match)
             continue
 
-        sys.stdout.write(line)
+        print(line)
 
 def main():
     # Create an argument parser using the file's docsctring as its