Commit d886c4d3 authored by mathieui's avatar mathieui
Browse files

Add line start/end markers on the regex

parent 444af2be
......@@ -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):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment