From 9d04a4108b28aa24184638d680f8f7c17be8ced3 Mon Sep 17 00:00:00 2001 From: IRBorisov <8611739+IRBorisov@users.noreply.github.com> Date: Sun, 25 Feb 2024 21:16:56 +0300 Subject: [PATCH] Enable backend logging for production Revert "Enable backend logging for production" This reverts commit c355cd4c2c2ea4874307ecf08dff8d33bb1f707a. Fix backend logging --- rsconcept/backend/project/settings.py | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/rsconcept/backend/project/settings.py b/rsconcept/backend/project/settings.py index e2b573bc..e0ea326b 100644 --- a/rsconcept/backend/project/settings.py +++ b/rsconcept/backend/project/settings.py @@ -165,10 +165,10 @@ SPECTACULAR_SETTINGS = { 'DISABLE_ERRORS_AND_WARNINGS': False, - "SWAGGER_UI_SETTINGS": { - "deepLinking": True, - "persistAuthorization": True, - "withCredentials": True + 'SWAGGER_UI_SETTINGS': { + 'deepLinking': True, + 'persistAuthorization': True, + 'withCredentials': True } } @@ -206,3 +206,18 @@ USE_TZ = True # https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' + + +LOGGING = { + 'version': 1, + 'disable_existing_loggers': False, + 'handlers': { + 'console': { + 'class': 'logging.StreamHandler', + }, + }, + 'root': { + 'handlers': ['console'], + 'level': 'DEBUG', + }, +}