@@ -44,7 +44,7 @@ def check_exact_match(line, expected_line):
|
||||
|
||||
# Look for either start of line or whitespace, then the expected_line, then either end of the line or whitespace.
|
||||
# This way we don't partial match inside of a string. So for example, 'foo' matches 'foo bar' but not 'foobar'
|
||||
regex_pattern = re.compile("(^|\\s){}($|\\s)".format(re.escape(expected_line)))
|
||||
regex_pattern = re.compile("(^|\\s){}($|\\s)".format(re.escape(expected_line)), re.UNICODE)
|
||||
if regex_pattern.search(line) is not None:
|
||||
return expected_line
|
||||
|
||||
@@ -125,7 +125,7 @@ class LogMonitor(object):
|
||||
self.py_log = ""
|
||||
try:
|
||||
logger.debug("Monitoring log file in '{}' ".format(self.log_file_path))
|
||||
with open(self.log_file_path, mode='r') as log:
|
||||
with open(self.log_file_path, mode='r', encoding='utf-8') as log:
|
||||
logger.info(
|
||||
"Monitoring log file '{}' for '{}' seconds".format(self.log_file_path, timeout))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user