Highlight: Could not connect to [10.0.0.1]:80.
authorFabian Keil <fk@fabiankeil.de>
Mon, 25 May 2009 19:11:03 +0000 (19:11 +0000)
committerFabian Keil <fk@fabiankeil.de>
Mon, 25 May 2009 19:11:03 +0000 (19:11 +0000)
tools/privoxy-log-parser.pl

index 0a68da2..ab4b2f1 100755 (executable)
@@ -8,7 +8,7 @@
 #
 # http://www.fabiankeil.de/sourcecode/privoxy-log-parser/
 #
-# $Id: privoxy-log-parser.pl,v 1.145 2009/05/19 17:21:35 fk Exp $
+# $Id: privoxy-log-parser.pl,v 1.146 2009/05/25 19:10:20 fk Exp $
 #
 # TODO:
 #       - LOG_LEVEL_CGI, LOG_LEVEL_ERROR, LOG_LEVEL_WRITE content highlighting
@@ -1564,6 +1564,13 @@ sub handle_loglevel_connect ($) {
         $c = highlight_matched_host($c, '(?<=Connected to )[^\[\s]+');
         $c =~ s@(?<=\]:)(\d+)@$h{'Number'}$1$h{'Standard'}@;
 
+    } elsif ($c =~ m/^Could not connect to /) {
+
+        # Could not connect to [10.0.0.1]:80.
+
+        $c = highlight_matched_host($c, '(?<=\[)[^\]]+');
+        $c =~ s@(?<=\]:)(\d+)@$h{'Number'}$1$h{'Standard'}@;
+
     } elsif ($c =~ m/^Waiting for the next client request/ or
              $c =~ m/^The connection on server socket/ ) {