[Privoxy-commits] [privoxy] 01/08: privoxy-log-parser: Log truncated LOG_LEVEL_CLF messages more gracefully

User Git git at git.privoxy.org
Wed Jan 13 08:58:10 UTC 2021


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

git pushed a commit to branch master
in repository privoxy.

commit 299b32a3e457af4ef165d87da561fff5885b5703
Author: Fabian Keil <fk at fabiankeil.de>
AuthorDate: Mon Jan 11 14:23:52 2021 +0100

    privoxy-log-parser: Log truncated LOG_LEVEL_CLF messages more gracefully
    
    ... and note that the statistics will be inprecise.
---
 tools/privoxy-log-parser.pl | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tools/privoxy-log-parser.pl b/tools/privoxy-log-parser.pl
index 62503073..5e52de06 100755
--- a/tools/privoxy-log-parser.pl
+++ b/tools/privoxy-log-parser.pl
@@ -2090,7 +2090,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}++;

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


More information about the Privoxy-commits mailing list