Accept and highlight: Closing client socket 5. Keep-alive: 0, Socket alive: 1. Data...
authorFabian Keil <fk@fabiankeil.de>
Fri, 27 Jul 2012 17:42:39 +0000 (17:42 +0000)
committerFabian Keil <fk@fabiankeil.de>
Fri, 27 Jul 2012 17:42:39 +0000 (17:42 +0000)
tools/privoxy-log-parser.pl

index 284e6f9..e61eb93 100755 (executable)
@@ -8,7 +8,7 @@
 #
 # http://www.fabiankeil.de/sourcecode/privoxy-log-parser/
 #
-# $Id: privoxy-log-parser.pl,v 1.134 2012/07/27 17:37:22 fabiankeil Exp $
+# $Id: privoxy-log-parser.pl,v 1.135 2012/07/27 17:40:31 fabiankeil Exp $
 #
 # TODO:
 #       - LOG_LEVEL_CGI, LOG_LEVEL_ERROR, LOG_LEVEL_WRITE content highlighting
@@ -1432,6 +1432,14 @@ sub handle_loglevel_connect ($) {
         return '' if SUPPRESS_ACCEPTED_CONNECTIONS;
         $c = highlight_matched_host($c, '(?<=connection from ).*');
 
+    } elsif ($c =~ m/^Closing client socket/) {
+
+        # Closing client socket 5. Keep-alive: 0, Socket alive: 1. Data available: 0.
+        $c = highlight_matched_pattern($c, 'Number', '(?<=socket )\d+');
+        $c = highlight_matched_pattern($c, 'Number', '(?<=Keep-alive: )\d+');
+        $c = highlight_matched_pattern($c, 'Number', '(?<=Socket alive: )\d+');
+        $c = highlight_matched_pattern($c, 'Number', '(?<=available: )\d+');
+
     } elsif ($c =~ m/^write header to: .* failed:/) {
 
         # write header to: 10.0.0.1 failed: Broken pipe