From 3a03d68797b211bc7dab2db5085f112652b40c3a Mon Sep 17 00:00:00 2001 From: dilipbheda Date: Wed, 25 Dec 2024 15:13:58 +0530 Subject: [PATCH] Docs: add database queries log documentation --- documentation/api/guides/debugging.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/documentation/api/guides/debugging.md b/documentation/api/guides/debugging.md index 3d413514c60..c1bc969ffa1 100644 --- a/documentation/api/guides/debugging.md +++ b/documentation/api/guides/debugging.md @@ -69,3 +69,12 @@ This is the guide to debugging the API using VS Code. This uses Microsoft's [Visual Code debugger's official instructions](https://code.visualstudio.com/docs/editor/debugging) to better understand how to use the debugger interface to accomplish tasks like setting breakpoints, watching variables etc. + +## Debugging Database Queries + +To log all database queries, add the following `env` variables to your configuration + +``` +DJANGO_LOG_LEVEL=DEBUG +DJANGO_DATABASE_LOGGING=True +``` \ No newline at end of file