From 54871a1a07f84001abb545bcb5bd06339fff7407 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Wed, 3 Jun 2020 11:12:56 +0200 Subject: [PATCH] privoxy-log-parser.pl: Completely highlight: 'Connection from 192.168.2.1 on 127.0.1.1:8118 (socket 3) dropped due to ACL' Change the highlight type of the first IP address to "host" instead of "Number". --- tools/privoxy-log-parser.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/privoxy-log-parser.pl b/tools/privoxy-log-parser.pl index 12febaad..92288cca 100755 --- a/tools/privoxy-log-parser.pl +++ b/tools/privoxy-log-parser.pl @@ -1610,7 +1610,10 @@ sub handle_loglevel_connect($) { # Connection from 81.163.28.218 dropped due to ACL # Rejecting connection from 178.63.152.227. Maximum number of connections reached. - $c =~ s@(?<=onnection from )((?:\d+\.?){3}\d+)@$h{'Number'}$1$h{'Standard'}@; + # Connection from 192.168.2.1 on 127.0.1.1:8118 (socket 3) dropped due to ACL + $c = highlight_matched_host($c, '(?<=onnection from )[\d.:]+'); + $c = highlight_matched_host($c, '(?<=on )[\d.:]+'); + $c =~ s@(?<=socket )(\d+)@$h{'Number'}$1$h{'Standard'}@; } elsif ($c =~ m/^(?:Reusing|Closing) server socket / or $c =~ m/^No additional client request/) { -- 2.39.2