Skip to content

Instantly share code, notes, and snippets.

@alq666
Created March 27, 2012 22:54
Show Gist options
  • Save alq666/2221243 to your computer and use it in GitHub Desktop.
Save alq666/2221243 to your computer and use it in GitHub Desktop.
DogStreams
def check(self, agentConfig, move_end=True):
if not self.dogstreams:
return {}
output = {}
for dogstream in self.dogstreams:
try:
result = dogstream.check(agentConfig, move_end)
# result contains {"dogstream": [...]}
if "dogstream" in result and "dogstream" in output:
output["dogstream"].extend(result["dogstream"])
else:
output.update(result)
except Exception, e:
self.logger.exception(traceback.format_exc())
self.logger.error("Error in parsing %s" % (dogstream.log_path))
return output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment