X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=tools%2Fprivoxy-log-parser.pl;h=02a38cd8bf794587fa80452566730830bf9ac09d;hp=62503073928887444b0bbc7e963df0933e2d7a2e;hb=de04886d0723363b1f6a76ed51905a0e6c657091;hpb=639c42d7ab751ae9238e58100fa82038a132e0a1 diff --git a/tools/privoxy-log-parser.pl b/tools/privoxy-log-parser.pl index 62503073..02a38cd8 100755 --- a/tools/privoxy-log-parser.pl +++ b/tools/privoxy-log-parser.pl @@ -1422,6 +1422,11 @@ sub handle_loglevel_crunch($) { # [...]&filter... [too long, truncated] $content = highlight_matched_pattern($content, 'request_', '^.*(?=\.\.\. \[too long, truncated\]$)'); + } elsif ($content =~ m/Certificate error:/) { + + # Certificate error: ASN date error, current date after: https://expired.badssl.com/ + $content = highlight_matched_pattern($content, 'request_', 'https://.*'); + } else { # Blocked: http://ads.example.org/ @@ -1824,6 +1829,16 @@ sub handle_loglevel_connect($) { $c =~ s@(?<=client socket )(\d+)@$h{'Number'}$1$h{'Standard'}@; $c =~ s@(?<=server socket )(\d+)@$h{'Number'}$1$h{'Standard'}@; + } elsif ($c =~ m/^The last \d+ bytes of the request body have been read/) { + + # The last 12078 bytes of the request body have been read + $c =~ s@(?<=The last )(\d+)@$h{'Number'}$1$h{'Standard'}@; + + } elsif ($c =~ m/^Flushed \d+ bytes of request body/) { + + # Flushed 3153 bytes of request body + $c =~ s@(?<=Flushed )(\d+)@$h{'Number'}$1$h{'Standard'}@; + } elsif ($c =~ m/^Looks like we / or $c =~ m/^Unsetting keep-alive flag/ or $c =~ m/^No connections to wait/ or @@ -2090,7 +2105,12 @@ sub gather_loglevel_clf_stats($) { unless (defined $method) { # +0200] "Invalid request" 400 0 return if ($content =~ m/^[+-]\d{4}\] "Invalid request"/); - print("Failed to parse: $content\n"); + # +0100] "GET https://securepubads.g.doubleclick.net/gampad/ads?gd[...]... [too long, truncated] + if ($content =~ m/\[too long, truncated\]$/) { + print("Skipped LOG_LEVEL_CLF message that got truncated by Privoxy. Statistics will be inprecise.\n"); + } else { + print("Failed to parse: $content\n"); + } return; } $stats{'method'}{$method}++;