From 1b87aaaa8cd8d105342708e48894699620bd0189 Mon Sep 17 00:00:00 2001 From: Jennifer Richards Date: Wed, 12 Jun 2024 21:08:59 -0300 Subject: [PATCH] chore: configure logging for k8s --- k8s/settings_local.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/k8s/settings_local.py b/k8s/settings_local.py index 3c77551a9d..b3bb0f6d19 100644 --- a/k8s/settings_local.py +++ b/k8s/settings_local.py @@ -262,3 +262,9 @@ def _multiline_to_list(s): _csrf_trusted_origins_str = os.environ.get("DATATRACKER_CSRF_TRUSTED_ORIGINS") if _csrf_trusted_origins_str is not None: CSRF_TRUSTED_ORIGINS = _multiline_to_list(_csrf_trusted_origins_str) + +# Send logs to console instead of debug_console when running in kubernetes +LOGGING["loggers"]["django"]["handlers"] = ["console", "mail_admins"] +LOGGING["loggers"]["django.security"]["handlers"] = ["console"] +LOGGING["loggers"]["datatracker"]["handlers"] = ["console"] +LOGGING["loggers"]["celery"]["handlers"] = ["console"]