chore: configure logging for k8s (#7525)

This commit is contained in:
Jennifer Richards 2024-06-13 09:35:43 -03:00 committed by GitHub
parent 4c0e3e17f6
commit bdc4b618bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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"]