Skip to content

Commit

Permalink
made the monitor notifications less spamy
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederik Fix committed Apr 4, 2009
1 parent cc03945 commit cd300a1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions log_watcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,13 @@ def process_line(self, line):
"""process a single log entry"""
self.last_read = time.time()
print line
# we want to log everything from the box
self.queue_error_log(line)

# but have the notification only action on doord mesags
if not "doord" in line:
return False

if self.error(line[16:]) and not self.in_error_state:
print "have error %s" % line
self.transition_to_error_state(line)
Expand All @@ -81,9 +86,6 @@ def heartbeat_check(self):
# state logic
def error(self, line):
"""eval whether a given line is an log entry representing an error state"""
if not "doord" in line:
return False

line = line[7:]

for regex in self.regexes:
Expand Down

0 comments on commit cd300a1

Please sign in to comment.