# 05/19/99 - Stephen L Johnson
# Fixed a couple of bugs in the &new_file() which cause
# routine to not open the new file.
+# 12/21/01 - Stephen L Johnson
+# Added an exclude_pattern check field. A match on exclude_pattern
+# will exclude the log entry from that check.
package Spong::Client::logmon;
$fh->seek($self->{'pos'},0);
while (<$fh>) {
foreach $rep (@{$self->{'checks'}}) {
- $pattern = $rep->{'pattern'};
- if (/$pattern/i) {
+ my $pattern = $rep->{'pattern'};
+ my $exc_pattern = $rep->{'exclude_pattern'};
+ # If we get a hit and (no exclude or exclude doesn't hit)
+ if ( (! $exc_pattern ||
+ $exc_pattern && ! m/$exc_pattern/ ) &&
+ m/$pattern/i
+ ) {
+ m/$pattern/i;
$text = eval '"' . $rep->{'text'} . '"';
$id = $text if ! $rep->{'id'};
$self->{'stati'}->{$id} = { item=>'logs',