allow for reloading of logging settings via CTiT

This commit is contained in:
AlanCoding
2016-11-30 16:52:47 -05:00
parent 37ef4e8bc8
commit 3643d9c06b
2 changed files with 21 additions and 5 deletions

View File

@@ -40,6 +40,10 @@ def handle_setting_change(key, for_delete=False):
value=getattr(settings, setting_key, None),
enter=not bool(for_delete),
)
# TODO: Move logic to task to run on all cluster nodes
if setting_key.startswith('LOG_AGGREGATOR_'):
settings.LOGGING_CONFIG = None
logging.config.dictConfig(settings.LOGGING)
@receiver(post_save, sender=Setting)