Created
March 27, 2012 22:54
-
-
Save alq666/2221243 to your computer and use it in GitHub Desktop.
DogStreams
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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