diff --git a/src/imio/fpaudit/storage.py b/src/imio/fpaudit/storage.py index e77491a..1c54969 100644 --- a/src/imio/fpaudit/storage.py +++ b/src/imio/fpaudit/storage.py @@ -41,7 +41,7 @@ def store_config(logs_config): entry["log_id"], logformat=entry["log_format"], ) - log_i.handler.formatter.datefmt = "%y-%m-%d %H:%M:%S" + log_i.handler.formatter.datefmt = "%Y-%m-%d %H:%M:%S" dic[entry["log_id"]] = log_i storage = getUtility(ILogsStorage) storage.set(dic) diff --git a/src/imio/fpaudit/utils.py b/src/imio/fpaudit/utils.py index 11a457d..73fc633 100644 --- a/src/imio/fpaudit/utils.py +++ b/src/imio/fpaudit/utils.py @@ -49,7 +49,7 @@ def get_lines_info(line, extras): dic = {} # 24-10-10 14:59:07 - user=admin ip=127.0.0.1 action=AUDIT col_a=xxxx col_b=yyy pattern = ( - r"(?P\d{2}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}) - user=(?P.+?) " + r"(?P\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}) - user=(?P.+?) " r"ip=(?P[\d\.]+|None) action=(?P.+?)" )