Skip to content

Commit

Permalink
Updated date pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
sgeulette committed Oct 11, 2024
1 parent fd5dd4b commit fa97c55
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/imio/fpaudit/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion src/imio/fpaudit/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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<date>\d{2}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}) - user=(?P<user>.+?) "
r"(?P<date>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}) - user=(?P<user>.+?) "
r"ip=(?P<ip>[\d\.]+|None) action=(?P<action>.+?)"
)

Expand Down

0 comments on commit fa97c55

Please sign in to comment.