[Privoxy-commits] [privoxy] 02/12: privoxy-log-parser: Highlight the Crunch reason only once

User Git git at git.privoxy.org
Sun Aug 7 08:17:50 UTC 2022


This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository privoxy.

commit f0dfc47636316ae1c4ec49e74df8148b8d08aacd
Author: Fabian Keil <fk at fabiankeil.de>
AuthorDate: Fri Aug 5 09:41:12 2022 +0200

    privoxy-log-parser: Highlight the Crunch reason only once
    
    Previously the "crunch reason" could also be highlighted when
    the URL contained a matching string. The real crunch reason
    only occurs once per line, so there's no need to continue
    looking for it after it has been found once.
    
    While at it, add a comment with an example log line.
---
 tools/privoxy-log-parser.pl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/privoxy-log-parser.pl b/tools/privoxy-log-parser.pl
index 905767d2..b511931b 100755
--- a/tools/privoxy-log-parser.pl
+++ b/tools/privoxy-log-parser.pl
@@ -1460,7 +1460,8 @@ sub handle_loglevel_crunch($) {
 
     # Highlight crunch reason
     foreach my $reason (keys %reason_colours) {
-        $content =~ s@($reason)@$reason_colours{$reason}$1$h{'Standard'}@g;
+        # Crunch: Blocked: https://capture.condenastdigital.com/track?_o=cne&[...]&dim2=%7B%22adBlocked%[...]
+        $content =~ s@($reason)@$reason_colours{$reason}$1$h{'Standard'}@;
     }
 
     if ($content =~ m/\[too long, truncated\]$/) {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Privoxy-commits mailing list