From 35df8db8f5e0302519586f33e50393444ae750c3 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Fri, 16 Dec 2022 21:28:05 +0100 Subject: [PATCH] Update logging --- .../src/{{cookiecutter.project_slug}}/settings.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/{{cookiecutter.project_slug}}/src/{{cookiecutter.project_slug}}/settings.py b/{{cookiecutter.project_slug}}/src/{{cookiecutter.project_slug}}/settings.py index 535b018..2db2b0f 100644 --- a/{{cookiecutter.project_slug}}/src/{{cookiecutter.project_slug}}/settings.py +++ b/{{cookiecutter.project_slug}}/src/{{cookiecutter.project_slug}}/settings.py @@ -174,9 +174,22 @@ LOGGING = { "level": "INFO", # set to DEBUG for SQL log "propagate": False, }, + "root": { + "handlers": ["console"], + "level": "WARNING", + "propagate": False, + }, }, } +for app in CUSTOM_APPS: + LOGGING["loggers"][app] = { + "handlers": ["console"], + "level": env("LOG_LEVEL"), + "propagate": False, + } + + DEBUG_TOOLBAR_CONFIG = { "SHOW_TOOLBAR_CALLBACK": "{{ cookiecutter.project_slug }}.middleware.debug_toolbar_bypass_internal_ips", "RESULTS_CACHE_SIZE": 100,