From 3a03d68797b211bc7dab2db5085f112652b40c3a Mon Sep 17 00:00:00 2001 From: dilipbheda Date: Wed, 25 Dec 2024 15:13:58 +0530 Subject: [PATCH 1/6] 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 From fe23351e82d9c37ab4f5dc3b564d67e0b405683c Mon Sep 17 00:00:00 2001 From: Madison Swain-Bowden Date: Wed, 25 Dec 2024 08:25:22 -0800 Subject: [PATCH 2/6] Linting --- documentation/api/guides/debugging.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/documentation/api/guides/debugging.md b/documentation/api/guides/debugging.md index c1bc969ffa1..60a32386877 100644 --- a/documentation/api/guides/debugging.md +++ b/documentation/api/guides/debugging.md @@ -72,9 +72,10 @@ This is the guide to debugging the API using VS Code. This uses Microsoft's ## Debugging Database Queries -To log all database queries, add the following `env` variables to your configuration +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 +``` From efef51f9df988cbf517a54759d7fbac4f0d26de3 Mon Sep 17 00:00:00 2001 From: dilipbheda Date: Wed, 25 Dec 2024 22:04:44 +0530 Subject: [PATCH 3/6] Update the content --- documentation/api/guides/debugging.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/api/guides/debugging.md b/documentation/api/guides/debugging.md index 60a32386877..dc05cb8465d 100644 --- a/documentation/api/guides/debugging.md +++ b/documentation/api/guides/debugging.md @@ -72,8 +72,8 @@ This is the guide to debugging the API using VS Code. This uses Microsoft's ## Debugging Database Queries -To log all database queries, add the following `env` variables to your -configuration +To log all database queries, add the following variables to your `api/.env` +file: ``` DJANGO_LOG_LEVEL=DEBUG From f42b030749f6cb74a256f920c5c8f28db8213340 Mon Sep 17 00:00:00 2001 From: dilipbheda Date: Sat, 28 Dec 2024 21:07:30 +0530 Subject: [PATCH 4/6] Move content to logging.md --- documentation/api/guides/debugging.md | 10 ---------- documentation/api/guides/index.md | 1 + documentation/api/guides/logging.md | 9 +++++++++ 3 files changed, 10 insertions(+), 10 deletions(-) create mode 100644 documentation/api/guides/logging.md diff --git a/documentation/api/guides/debugging.md b/documentation/api/guides/debugging.md index dc05cb8465d..3d413514c60 100644 --- a/documentation/api/guides/debugging.md +++ b/documentation/api/guides/debugging.md @@ -69,13 +69,3 @@ 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 variables to your `api/.env` -file: - -``` -DJANGO_LOG_LEVEL=DEBUG -DJANGO_DATABASE_LOGGING=True -``` diff --git a/documentation/api/guides/index.md b/documentation/api/guides/index.md index fd90860002d..2963bd8605c 100644 --- a/documentation/api/guides/index.md +++ b/documentation/api/guides/index.md @@ -7,4 +7,5 @@ quickstart test documentation debugging +logging ``` diff --git a/documentation/api/guides/logging.md b/documentation/api/guides/logging.md new file mode 100644 index 00000000000..01daff1d146 --- /dev/null +++ b/documentation/api/guides/logging.md @@ -0,0 +1,9 @@ +## Debugging Database Queries + +To log all database queries, add the following variables to your `api/.env` +file: + +```shell +DJANGO_LOG_LEVEL=DEBUG +DJANGO_DATABASE_LOGGING=True +``` \ No newline at end of file From e71b6843a7fd534044b6da238e103d7f8c0d8905 Mon Sep 17 00:00:00 2001 From: dilipbheda Date: Sat, 28 Dec 2024 21:08:41 +0530 Subject: [PATCH 5/6] Add empty line --- documentation/api/guides/logging.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/api/guides/logging.md b/documentation/api/guides/logging.md index 01daff1d146..5e224dbed01 100644 --- a/documentation/api/guides/logging.md +++ b/documentation/api/guides/logging.md @@ -6,4 +6,4 @@ file: ```shell DJANGO_LOG_LEVEL=DEBUG DJANGO_DATABASE_LOGGING=True -``` \ No newline at end of file +``` From 9d9d35f4a8eb24c2487d17bac111c97decc97212 Mon Sep 17 00:00:00 2001 From: dilipbheda Date: Sat, 28 Dec 2024 21:23:49 +0530 Subject: [PATCH 6/6] fix: e2e error --- documentation/api/guides/logging.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/api/guides/logging.md b/documentation/api/guides/logging.md index 5e224dbed01..63326c930b2 100644 --- a/documentation/api/guides/logging.md +++ b/documentation/api/guides/logging.md @@ -1,4 +1,4 @@ -## Debugging Database Queries +# Debugging Database Queries To log all database queries, add the following variables to your `api/.env` file: