diff --git a/core/settings.py b/core/settings.py index 345c7f3..ee66c45 100644 --- a/core/settings.py +++ b/core/settings.py @@ -32,7 +32,7 @@ SECRET_KEY = os.getenv("SECRET_KEY", "2n5k63x#a(xc@-!tpxisd)bd!3bimfr1prj-*t7tnl(*j+#$0k") # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = not production +DEBUG = os.getenv("DEBUG", str(not production)) == "True" ALLOWED_HOSTS = [".localhost", "127.0.0.1", "[::1]", "0.0.0.0"] # noqa: S104 # Docker if "ALLOWED_HOSTS" in os.environ: @@ -188,6 +188,11 @@ "handlers": ["null"], "propagate": False, }, + "django.db.backends": { + "handlers": ["console"], + "level": "DEBUG" if production else os.getenv("LOG_LEVEL", "INFO"), + "propagate": False, + }, }, }