From d886c4d3dcdd7ef70804eeb63d41e36fbab7f9de Mon Sep 17 00:00:00 2001 From: mathieui Date: Thu, 28 Sep 2017 00:57:54 +0200 Subject: Add line start/end markers on the regex --- poezio/logger.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/poezio/logger.py b/poezio/logger.py index 1d98e059..002953f3 100644 --- a/poezio/logger.py +++ b/poezio/logger.py @@ -27,12 +27,12 @@ log = logging.getLogger(__name__) from poezio.config import LOG_DIR as log_dir -MESSAGE_LOG_RE = re.compile(r'MR (\d{4})(\d{2})(\d{2})T' +MESSAGE_LOG_RE = re.compile(r'^MR (\d{4})(\d{2})(\d{2})T' r'(\d{2}):(\d{2}):(\d{2})Z ' - r'(\d+) <([^ ]+)>  (.*)') -INFO_LOG_RE = re.compile(r'MI (\d{4})(\d{2})(\d{2})T' + r'(\d+) <([^ ]+)>  (.*)$') +INFO_LOG_RE = re.compile(r'^MI (\d{4})(\d{2})(\d{2})T' r'(\d{2}):(\d{2}):(\d{2})Z ' - r'(\d+) (.*)') + r'(\d+) (.*)$') class LogItem: def __init__(self, year, month, day, hour, minute, second, nb_lines, message): -- cgit v1.2.3