Skip to content

Commit

Permalink
chore: fix timing issue with logging overrides (#2660)
Browse files Browse the repository at this point in the history
Make sure that the call to `get_logger`  happens after the configuration
file overrides have a chance to set `LOGGING_FORMAT_STRING`.

FIXES: APER-3805
  • Loading branch information
deborahgu authored Dec 6, 2024
1 parent 49df0b6 commit e3f24fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions credentials/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@

ALLOWED_HOSTS = ["*"]

LOGGING_FORMAT_STRING = ""
LOGGING = get_logger_config(format_string=LOGGING_FORMAT_STRING)

# Keep track of the names of settings that represent dicts. Instead of overriding the values in base.py,
# the values read from disk should UPDATE the pre-configured dicts.
DICT_UPDATE_KEYS = ("JWT_AUTH",)
Expand Down Expand Up @@ -50,6 +47,9 @@
# Load the files storage backend settings for django storages
vars().update(FILE_STORAGE_BACKEND)

# make sure this happens after the configuration file overrides so format string can be overridden
LOGGING = get_logger_config(format_string=LOGGING_FORMAT_STRING)

if "EXTRA_APPS" in locals():
INSTALLED_APPS += EXTRA_APPS

Expand Down

0 comments on commit e3f24fd

Please sign in to comment.