From cd35af471ab1e6ab7463be8a4ef9ec3cd315d606 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Tue, 3 Jan 2023 19:01:17 +0100 Subject: [PATCH] Enable logging --- src/web/web/settings.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/web/web/settings.py b/src/web/web/settings.py index a12897e..330a8fb 100644 --- a/src/web/web/settings.py +++ b/src/web/web/settings.py @@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/4.1/ref/settings/ """ from pathlib import Path +import logging # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent @@ -122,3 +123,11 @@ STATIC_URL = "static/" # https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" + +# https://docs.djangoproject.com/en/4.1/topics/logging/ +LOGGING = { + "version": 1, + "disable_existing_loggers": False, + "handlers": {"console": {"class": "logging.StreamHandler"}}, + "root": {"handlers": ["console"], "level": "WARNING"}, +}