Skip to content

Commit

Permalink
chore: configure logging for k8s (#7525)
Browse files Browse the repository at this point in the history
  • Loading branch information
jennifer-richards committed Jun 13, 2024
1 parent 4c0e3e1 commit bdc4b61
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions k8s/settings_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit bdc4b61

Please sign in to comment.