Grep log entry category as word
@@ -2029,11 +2029,11 @@ def _get_load_from_info_output(info):
def _grep_log_for_errors(log):
except_re = re.compile(r'[Ee]xception|AssertionError')
- log_cat_re = re.compile(r'(INFO|DEBUG|WARN|ERROR)')
+ log_cat_re = re.compile(r'(\W|^)(INFO|DEBUG|WARN|ERROR)\W')
def log_line_category(line):
match = log_cat_re.search(line)
- return match.group(0) if match else None
+ return match.group(2) if match else None
matches = []
