Skip to content

Commit

Permalink
✨[#344] Add ability to enable/disable request logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Coperh committed Apr 9, 2024
1 parent 65bf741 commit ac446d7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/objects/conf/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@
FIXTURE_DIRS = (os.path.join(DJANGO_PROJECT_DIR, "fixtures"),)

LOGGING_DIR = os.path.join(BASE_DIR, "log")
LOG_REQUESTS = config("LOG_REQUESTS", default=False)
LOG_OUTGOING_REQUESTS_DB_SAVE = config("LOG_OUTGOING_REQUESTS_DB_SAVE", default=True)

LOGGING = {
"version": 1,
Expand Down Expand Up @@ -321,7 +323,8 @@
"level": "DEBUG",
},
"log_outgoing_requests": {
"handlers": ["log_outgoing_requests", "save_outgoing_requests"],
"handlers": ["log_outgoing_requests", "save_outgoing_requests"] if LOG_REQUESTS
else [],
"level": "DEBUG",
"propagate": True,
},
Expand Down

0 comments on commit ac446d7

Please sign in to comment.