summaryrefslogtreecommitdiff
path: root/poezio/logger.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2017-09-28 00:57:54 +0200
committermathieui <mathieui@mathieui.net>2017-09-28 00:57:54 +0200
commitd886c4d3dcdd7ef70804eeb63d41e36fbab7f9de (patch)
tree5d01736b59afc688dff1f8dc9652f1384891f30d /poezio/logger.py
parent444af2be6f4a4bce2bb5cfc8a7fe80ab95ca8d49 (diff)
downloadpoezio-d886c4d3dcdd7ef70804eeb63d41e36fbab7f9de.tar.gz
poezio-d886c4d3dcdd7ef70804eeb63d41e36fbab7f9de.tar.bz2
poezio-d886c4d3dcdd7ef70804eeb63d41e36fbab7f9de.tar.xz
poezio-d886c4d3dcdd7ef70804eeb63d41e36fbab7f9de.zip
Add line start/end markers on the regex
Diffstat (limited to 'poezio/logger.py')
-rw-r--r--poezio/logger.py8
1 files 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):