Skip to content

Commit

Permalink
be a bit more specific in what gets filtered out of /users/
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchop committed Jul 22, 2024
1 parent da859d1 commit 7e18815
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# * https://www.sheshbabu.com/posts/fastapi-structured-json-logging/
# * https://rob-blackbourn.medium.com/how-to-use-python-logging-queuehandler-with-dictconfig-1e8b1284e27a

IGNORED_PATHS = ["/auth/", "/user/", "/search"]
IGNORED_PATHS = ["/auth/", "/user/reset-password", "/search"]


class ArangoHandler(logging.Handler):
Expand All @@ -33,7 +33,7 @@ def emit(self, record):
if record.__dict__["type"] != "audit.log":
return
target = record.__dict__["path"]
if any(path in target for path in IGNORED_PATHS):
if any(path in target.lower() for path in IGNORED_PATHS):
return
action = self.actions.get(record.__dict__["method"], "unknown")
if record.__dict__["status_code"] == 200:
Expand Down

0 comments on commit 7e18815

Please sign in to comment.