Skip to content

Commit ac446d7

Browse files
committed
✨[#344] Add ability to enable/disable request logging
1 parent 65bf741 commit ac446d7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/objects/conf/base.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,8 @@
233233
FIXTURE_DIRS = (os.path.join(DJANGO_PROJECT_DIR, "fixtures"),)
234234

235235
LOGGING_DIR = os.path.join(BASE_DIR, "log")
236+
LOG_REQUESTS = config("LOG_REQUESTS", default=False)
237+
LOG_OUTGOING_REQUESTS_DB_SAVE = config("LOG_OUTGOING_REQUESTS_DB_SAVE", default=True)
236238

237239
LOGGING = {
238240
"version": 1,
@@ -321,7 +323,8 @@
321323
"level": "DEBUG",
322324
},
323325
"log_outgoing_requests": {
324-
"handlers": ["log_outgoing_requests", "save_outgoing_requests"],
326+
"handlers": ["log_outgoing_requests", "save_outgoing_requests"] if LOG_REQUESTS
327+
else [],
325328
"level": "DEBUG",
326329
"propagate": True,
327330
},

0 commit comments

Comments
 (0)