From: Stefan Schantl Date: Thu, 18 Feb 2016 09:23:22 +0000 (+0100) Subject: Revert "Except and log if an event could not be parsed correctly." X-Git-Tag: 2.0~29 X-Git-Url: http://git.ipfire.org/?p=people%2Fstevee%2Fguardian.git;a=commitdiff_plain;h=72d0b62644811d6190d1a876ab2774b63d65b033 Revert "Except and log if an event could not be parsed correctly." This reverts commit dd0483736d6d2f194908eff73f36f50de1dd0197. Breaks ability for skipping lines which are not, affected by any filter (if-clause) of a parser. Signed-off-by: Stefan Schantl --- diff --git a/guardian b/guardian index 691ddc6..7b4c23f 100644 --- a/guardian +++ b/guardian @@ -259,12 +259,6 @@ sub Worker ($) { # Put the required action into the queue. $queue->enqueue(@action); } - # If no action is returned by the Parser, the message - # could not be parser corretly. - else { - # Log failed parse attempt. - $logger->Log("err", "Error parsing event: \[$parser - @message\]"); - } } else { # Sleep for 10ms until the next round of the loop will start. sleep(0.01); diff --git a/modules/Parser.pm b/modules/Parser.pm index 9ec0586..9c3fc87 100644 --- a/modules/Parser.pm +++ b/modules/Parser.pm @@ -30,16 +30,8 @@ sub Parser ($$) { # Call responsible message parser. my $action = $logfile_parsers{$parser}->(@message); - # If the parser successfully parsed the message, an action - # has been returned. - if ($action) { - # Return which action should be performed. - return "count $action"; - } - - # If the parser was not able to parse the the given message - # in the right way, return Nothing. - return; + # Return which action should be performed. + return "count $action"; } #