From e92466c43286d662435581e470063454a429fac0 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 7 Apr 2021 20:37:02 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Configure=20basic=20console=20lo?= =?UTF-8?q?gging=20functionality?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sophon/settings.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/sophon/settings.py b/sophon/settings.py index 836d7e9..610b2d2 100644 --- a/sophon/settings.py +++ b/sophon/settings.py @@ -141,3 +141,31 @@ REST_FRAMEWORK = { 'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly' ] } + +# Logging +# https://docs.djangoproject.com/en/3.1/ref/settings/#std:setting-LOGGING + +LOGGING = { + "version": 1, + "handlers": { + "console": { + "class": "logging.StreamHandler", + "level": "DEBUG", + "stream": "ext://sys.stdout", + }, + }, + "loggers": { + "sophon": { + "level": "DEBUG", + }, + "django": { + "level": "INFO", + }, + "rest_framework": { + "level": "INFO", + }, + }, + "root": { + "handlers": ["console"], + } +}