From bdc4b618bbaabac442a17dba35266ea7f82d6302 Mon Sep 17 00:00:00 2001 From: Jennifer Richards Date: Thu, 13 Jun 2024 09:35:43 -0300 Subject: [PATCH] chore: configure logging for k8s (#7525) --- k8s/settings_local.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/k8s/settings_local.py b/k8s/settings_local.py index 3c77551a9..b3bb0f6d1 100644 --- a/k8s/settings_local.py +++ b/k8s/settings_local.py @@ -262,3 +262,9 @@ CACHES = { _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"]