From ddaae0e3bad3cde9bb5038308c242273a6e7b449 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Fri, 20 Sep 2013 14:58:26 +0800 Subject: Bug 918644: ignore "Use of uninitialized value $compiled in concatenation (.) or string at /usr/lib64/perl5/Template/Provider.pm line 572." warnings --- Bugzilla/Sentry.pm | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'Bugzilla/Sentry.pm') diff --git a/Bugzilla/Sentry.pm b/Bugzilla/Sentry.pm index ac053d992..d2994e78b 100644 --- a/Bugzilla/Sentry.pm +++ b/Bugzilla/Sentry.pm @@ -46,8 +46,16 @@ use constant CONFIG => { token_generation_error )], - # any error messages matching these regex's will not be sent to sentry + # any error/warning messages matching these regex's will not be logged or + # sent to sentry ignore => [ + qr/^compiled template :\s*$/, + qr/^Use of uninitialized value \$compiled in concatenation \(\.\) or string/, + ], + + # any error/warning messages matching these regex's will be logged but not + # sent to sentry + sentry_ignore => [ qr/Software caused connection abort/, qr/Could not check out .*\/cvsroot/, qr/Unicode character \S+ is illegal/, @@ -124,6 +132,11 @@ sub sentry_handle_error { } my $message = join(" ", map { trim($_) } grep { $_ ne '' } @message); + # message content filtering + foreach my $re (@{ CONFIG->{ignore} }) { + return 0 if $message =~ $re; + } + # determine logger my $logger; foreach my $config (@{ CONFIG->{logger} }) { @@ -154,7 +167,7 @@ sub sentry_handle_error { # message content filtering if ($send_to_sentry) { - foreach my $re (@{ CONFIG->{ignore} }) { + foreach my $re (@{ CONFIG->{sentry_ignore} }) { if ($message =~ $re) { $send_to_sentry = 0; last; -- cgit v1.2.3-24-g4f1b