From ae76ef3606bddbc384055802832d2921fbd3b897 Mon Sep 17 00:00:00 2001 From: "Christopher C. Wells" Date: Mon, 5 Feb 2024 21:02:44 -0800 Subject: [PATCH] Add LOGGING override option for production troubleshooting --- babybuddy/settings/development.py | 41 +++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/babybuddy/settings/development.py b/babybuddy/settings/development.py index 4124b2bb..28f420f5 100644 --- a/babybuddy/settings/development.py +++ b/babybuddy/settings/development.py @@ -19,6 +19,47 @@ STORAGES["staticfiles"][ ] = "django.contrib.staticfiles.storage.StaticFilesStorage" +# Logging +# https://docs.djangoproject.com/en/5.0/ref/logging/ +# +# Uncomment this LOGGING configuration for verbose logging even when DEBUG=False. +# Based on: https://stackoverflow.com/a/56456466 + +# LOGGING = { +# "version": 1, +# "disable_existing_loggers": False, +# "formatters": { +# "verbose": { +# "format": ( +# "%(asctime)s [%(process)d] [%(levelname)s] " +# "pathname=%(pathname)s lineno=%(lineno)s " +# "funcname=%(funcName)s %(message)s" +# ), +# "datefmt": "%Y-%m-%d %H:%M:%S", +# }, +# }, +# "handlers": { +# "console": { +# "level": "INFO", +# "class": "logging.StreamHandler", +# "formatter": "verbose", +# }, +# }, +# "loggers": { +# "django": { +# "handlers": ["console"], +# "level": "DEBUG", +# "propagate": True, +# }, +# "django.server": { +# "handlers": ["console"], +# "level": "DEBUG", +# "propagate": False, +# }, +# }, +# } + + # Django Rest Framework # https://www.django-rest-framework.org/