Add LOGGING override option for production troubleshooting

This commit is contained in:
Christopher C. Wells 2024-02-05 21:02:44 -08:00
parent 3c54636790
commit ae76ef3606
1 changed files with 41 additions and 0 deletions

View File

@ -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/