]> git.ipfire.org Git - people/stevee/guardian.git/blobdiff - guardian
Except and log if an event could not be parsed correctly.
[people/stevee/guardian.git] / guardian
index 7b4c23fae7b86c7e2d5b1ea7a726a23b03baf2f9..691ddc66e1f0013add0fd5245f7864d70931d049 100644 (file)
--- a/guardian
+++ b/guardian
@@ -259,6 +259,12 @@ sub Worker ($) {
                                # Put the required action into the queue.
                                $queue->enqueue(@action);
                        }
                                # 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);
                } else {
                        # Sleep for 10ms until the next round of the loop will start.
                        sleep(0.01);