aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/settings/production.py58
1 files changed, 43 insertions, 15 deletions
diff --git a/config/settings/production.py b/config/settings/production.py
index a0cd8e0..4fab057 100644
--- a/config/settings/production.py
+++ b/config/settings/production.py
@@ -143,36 +143,64 @@ ADMIN_URL = env("DJANGO_ADMIN_URL")
LOGGING = {
"version": 1,
- "disable_existing_loggers": True,
- "formatters": {
- "verbose": {
- "format": "%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s",
- },
- },
+ "disable_existing_loggers": False,
"handlers": {
"console": {
"level": "DEBUG",
"class": "logging.StreamHandler",
- "formatter": "verbose",
+ },
+ "file": {
+ "level": "DEBUG",
+ "class": "logging.FileHandler",
+ "filename": "/home/django/logfile.log", # Update this path
},
},
- "root": {"level": "INFO", "handlers": ["console"]},
"loggers": {
- "django.db.backends": {
+ "django": {
+ "handlers": ["console", "file"],
"level": "ERROR",
- "handlers": ["console"],
- "propagate": False,
+ "propagate": True,
},
- # Errors logged by the SDK itself
- "sentry_sdk": {"level": "ERROR", "handlers": ["console"], "propagate": False},
- "django.security.DisallowedHost": {
+ "django.request": {
+ "handlers": ["console", "file"],
"level": "ERROR",
- "handlers": ["console"],
"propagate": False,
},
},
}
+# LOGGING = {
+# "version": 1,
+# "disable_existing_loggers": True,
+# "formatters": {
+# "verbose": {
+# "format": "%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s",
+# },
+# },
+# "handlers": {
+# "console": {
+# "level": "DEBUG",
+# "class": "logging.StreamHandler",
+# "formatter": "verbose",
+# },
+# },
+# "root": {"level": "INFO", "handlers": ["console"]},
+# "loggers": {
+# "django.db.backends": {
+# "level": "ERROR",
+# "handlers": ["console"],
+# "propagate": False,
+# },
+# # Errors logged by the SDK itself
+# "sentry_sdk": {"level": "ERROR", "handlers": ["console"], "propagate": False},
+# "django.security.DisallowedHost": {
+# "level": "ERROR",
+# "handlers": ["console"],
+# "propagate": False,
+# },
+# },
+# }
+
# # Sentry
# # ------------------------------------------------------------------------------
# SENTRY_DSN = env("SENTRY_DSN")