Permalink
Browse files

Merge pull request #3459 from mmerickel/fix-logging-setup

do not configure logging in the master process when using the reloader
  • Loading branch information...
mmerickel committed Jan 30, 2019
2 parents 3271463 + 36f3bf6 commit 1035ca1086ee86d3ce4f207bd3c9b55d5484170b
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/pyramid/scripts/pserve.py
@@ -182,7 +182,11 @@ def run(self): # pragma: no cover
app_name = self.args.app_name

loader = self._get_config_loader(config_uri)
loader.setup_logging(config_vars)

# setup logging only in the worker process incase the logging config
# opens files which should not be opened by multiple processes at once
if not self.args.reload or hupper.is_active():
loader.setup_logging(config_vars)

self.pserve_file_config(loader, global_conf=config_vars)

0 comments on commit 1035ca1

Please sign in to comment.