Refactor logger config for workers

- to make it easier to add more config options.
This commit is contained in:
Richard van der Hoff 2017-03-10 15:16:50 +00:00
parent 45d173a59a
commit d84bd51e95
9 changed files with 26 additions and 13 deletions

View file

@ -20,6 +20,8 @@ import gc
import logging
import os
import sys
import synapse.config.logger
from synapse.config._base import ConfigError
from synapse.python_dependencies import (
@ -286,7 +288,7 @@ def setup(config_options):
# generating config files and shouldn't try to continue.
sys.exit(0)
config.setup_logging()
synapse.config.logger.setup_logging(config, use_worker_options=False)
# check any extra requirements we have now we have a config
check_requirements(config)