X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=tools%2Fprivoxy-log-parser.pl;h=c0f8b219a22ff3f2b21ba392dec332bbb06fbdfc;hp=68bafcd0d5eed254e5b248e0b35349c60ae5c7ca;hb=31265b1b2d8f5b81cbde0fcada6271d800430c59;hpb=23445442f4bf0aa0bcf6e35df09daf8ef0d69d99 diff --git a/tools/privoxy-log-parser.pl b/tools/privoxy-log-parser.pl index 68bafcd0..c0f8b219 100755 --- a/tools/privoxy-log-parser.pl +++ b/tools/privoxy-log-parser.pl @@ -1078,6 +1078,17 @@ sub handle_loglevel_re_filter($) { $c .= $req{$t}{'content_size_change'} . $h{'Standard'} . ")"; $content = $c; + } elsif ($c =~ m/^filtering request body from client /) { + + # filtering request body from client 127.0.0.1 (size 958) with 'null-filter' produced 0 hits (new size 958). + + $c =~ s@(?<=from client )([^\s]+)@$h{'ip-address'}$1$h{'Standard'}@; + $c =~ s@(?<=\(size )(\d+)@$h{'Number'}$1$h{'Standard'}@; + $c =~ s@([^\s]+?)(\'? produced)@$h{'filter'}$1$h{'Standard'}$2@; + $c =~ s@(?<=\(new size )(\d+)@$h{'Number'}$1$h{'Standard'}@; + $c =~ s@(?<=produced )(\d+)(?= hits)@$h{'Number'}$1$h{'Standard'}@; + $content = $c; + } elsif ($c =~ /\.{3}$/ and $c =~ m/^(?:re_)?filtering \'?(.*?)\'? \(size (\d*)\) with (?:filter )?\'?([^\s]*?)\'? ?\.{3}$/) { @@ -1245,7 +1256,22 @@ sub handle_loglevel_tagging($) { $c =~ s@(?<=^Tagger \')([^\']*)@$h{'tagger'}$1$h{'Standard'}@; $c =~ s@(?<=added tag \')([^\']*)@$h{'tag'}$1$h{'Standard'}@; $c =~ s@(?<=Action bits )(updated)@$h{'action-bits-update'}$1$h{'Standard'}@; + + } elsif ($c =~ /^Enlisting tag/) { + + # Enlisting tag 'forward-directly' for client 127.0.0.1. + + $c =~ s@(?<=tag \')([^\']*)@$h{'tag'}$1$h{'Standard'}@; + $c = highlight_matched_host($c, '[^\s]+(?=\.$)'); + + } elsif ($c =~ /^Client tag/) { + + # Client tag 'forward-directly' matches + + $c =~ s@(?<=tag \')([^\']*)@$h{'tag'}$1$h{'Standard'}@; + } + return $c; }