From 4a63220fb8d5d5a2cd2b36ff3cd414f7c4d4835f Mon Sep 17 00:00:00 2001 From: Viswamedha Nalabotu Date: Wed, 11 Mar 2026 11:30:04 +0000 Subject: [PATCH] Added standardised logging --- config/settings.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/config/settings.py b/config/settings.py index 0a16cf7..7de2e60 100644 --- a/config/settings.py +++ b/config/settings.py @@ -215,3 +215,26 @@ if DEBUG: CORS_ALLOWED_ORIGINS.append(f'http://{DOMAIN_NAME}:8000') CSRF_TRUSTED_ORIGINS.append(f'http://{DOMAIN_NAME}:5173') CSRF_TRUSTED_ORIGINS.append(f'http://{DOMAIN_NAME}:8000') + +LOGGING = { + 'version': 1, + 'disable_existing_loggers': False, + 'formatters': { + 'standard': { + 'format': '%(asctime)s [%(levelname)s] %(name)s: %(message)s', + }, + }, + 'handlers': { + 'console': { + 'class': 'logging.StreamHandler', + 'formatter': 'standard', + }, + }, + 'loggers': { + 'apps.onboarding': { + 'handlers': ['console'], + 'level': 'INFO', + 'propagate': False, + }, + }, +}