# HG changeset patch # User Ludovic Chabant # Date 1437717840 25200 # Node ID 22a230d9962112fd5209e25c05665720f022f3a1 # Parent a406b75c4beab0e9e43640c32ada11ca1c4d361d bake: Fix logging configuration for multi-processing on Windows. diff -r a406b75c4bea -r 22a230d99621 piecrust/workerpool.py --- a/piecrust/workerpool.py Thu Jul 23 23:03:33 2015 -0700 +++ b/piecrust/workerpool.py Thu Jul 23 23:04:00 2015 -0700 @@ -44,6 +44,12 @@ def _real_worker_func(params): + # In a context where `multiprocessing` is using the `spawn` forking model, + # the new process doesn't inherit anything, so we lost all our logging + # configuration here. Let's set it up again. + from piecrust.main import _pre_parse_chef_args + _pre_parse_chef_args(sys.argv[1:]) + wid = params.wid logger.debug("Worker %d initializing..." % wid)