From: Fabian Keil <fk@fabiankeil.de>
Date: Tue, 19 May 2009 17:22:34 +0000 (+0000)
Subject: Highlight: Connected to tor-jail[10.0.0.2]:9050.
X-Git-Tag: v_3_0_13~90
X-Git-Url: http://www.privoxy.org/gitweb/%22https:/@default-cgi@/faq/static/developer-manual/@default-cgi@show-url-info?a=commitdiff_plain;h=64336bb79cf3ff79b0d874d9dc311f3986d1111c;p=privoxy.git

Highlight: Connected to tor-jail[10.0.0.2]:9050.
---

diff --git a/tools/privoxy-log-parser.pl b/tools/privoxy-log-parser.pl
index 7716dcf5..0a68da2f 100755
--- a/tools/privoxy-log-parser.pl
+++ b/tools/privoxy-log-parser.pl
@@ -8,7 +8,7 @@
 #
 # http://www.fabiankeil.de/sourcecode/privoxy-log-parser/
 #
-# $Id: privoxy-log-parser.pl,v 1.26 2009/05/13 18:24:11 fabiankeil Exp $
+# $Id: privoxy-log-parser.pl,v 1.145 2009/05/19 17:21:35 fk Exp $
 #
 # TODO:
 #       - LOG_LEVEL_CGI, LOG_LEVEL_ERROR, LOG_LEVEL_WRITE content highlighting
@@ -1556,6 +1556,14 @@ sub handle_loglevel_connect ($) {
         $c =~ s@(?<=server socket )(\d+)@$h{'Number'}$1$h{'Standard'}@;
         $c = highlight_matched_host($c, '(?<=for )[^\s]+(?=\.$)');
 
+    } elsif ($c =~ m/^Connected to /) {
+
+        # Connected to tor-jail[10.0.0.2]:9050.
+
+        $c = highlight_matched_host($c, '(?<=\[)[^\]]+');
+        $c = highlight_matched_host($c, '(?<=Connected to )[^\[\s]+');
+        $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/ ) {