From 06bcdfb2bed6f65d39018f52b868c34c3bbe41f4 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sat, 31 May 2025 00:01:57 +0200 Subject: [PATCH] gatherstats: Don't die on parsing errors. Just warn if host or client can't be identified. Signed-off-by: Thomas Hochstein --- bin/gatherstats.pl | 4 ++-- doc/ChangeLog | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/gatherstats.pl b/bin/gatherstats.pl index b4c844e..9b02bfa 100755 --- a/bin/gatherstats.pl +++ b/bin/gatherstats.pl @@ -339,7 +339,7 @@ sub HostStats { $Postings{$Host}++; $Postings{'ALL'}++; } else { - &Bleat(2,sprintf("%s FAILED", $Header{'message-id'})) if !$Host; + &Bleat(1,sprintf("%s FAILED", $Header{'message-id'})) if !$Host; } printf("%s: %s\n", $Header{'message-id'}, $Host) if ($MID or $Debug && $Debug >1); @@ -487,7 +487,7 @@ sub ClientStats { version => $Version); push @Clients, { %UserAgent }; } else { - &Bleat(2,sprintf("%s FAILED", $Header{'message-id'})) if !@Clients; + &Bleat(1,sprintf("%s FAILED", $Header{'message-id'})) if !@Clients; } } } diff --git a/doc/ChangeLog b/doc/ChangeLog index f230009..e102c34 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -8,6 +8,7 @@ NewsStats 0.4.0 (unreleased) * Move cliservstats to hoststats. * Add clientstats (for clients). * Add ClientStats to postingstats. + * gatherstats: Don't die on parsing errors. NewsStats 0.3.0 (2025-05-18) * Extract GroupStats (in gatherstats) to subroutine.