Improved log parser logs
This commit is contained in:
parent
3a8a1f446b
commit
2dec2e6a70
|
@ -13,9 +13,12 @@ class MonkeyLogParser(object):
|
||||||
|
|
||||||
def print_errors(self):
|
def print_errors(self):
|
||||||
errors = MonkeyLogParser.get_errors(self.log_contents)
|
errors = MonkeyLogParser.get_errors(self.log_contents)
|
||||||
print("Found {} errors:".format(len(errors)))
|
if len(errors) > 0:
|
||||||
for error_line in errors:
|
print("Found {} errors:".format(len(errors)))
|
||||||
print(error_line)
|
for error_line in errors:
|
||||||
|
print(error_line)
|
||||||
|
else:
|
||||||
|
print("No errors!")
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_errors(log_contents):
|
def get_errors(log_contents):
|
||||||
|
@ -24,9 +27,12 @@ class MonkeyLogParser(object):
|
||||||
|
|
||||||
def print_warnings(self):
|
def print_warnings(self):
|
||||||
warnings = MonkeyLogParser.get_warnings(self.log_contents)
|
warnings = MonkeyLogParser.get_warnings(self.log_contents)
|
||||||
print("Found {} warnings:".format(len(warnings)))
|
if len(warnings) > 0:
|
||||||
for warning_line in warnings:
|
print("Found {} warnings:".format(len(warnings)))
|
||||||
print(warning_line)
|
for warning_line in warnings:
|
||||||
|
print(warning_line)
|
||||||
|
else:
|
||||||
|
print("No warnings!")
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_warnings(log_contents):
|
def get_warnings(log_contents):
|
||||||
|
|
Loading…
Reference in New Issue