Merge pull request #28422 from cachedout/issue_28123

Handle windows logging on thread_multi [WIP]
This commit is contained in:
Mike Place 2015-10-30 11:12:26 -06:00
commit 31777cb4e9

View File

@ -1147,6 +1147,13 @@ class Minion(MinionBase):
salt.utils.appendproctitle(data['jid'])
# this seems awkward at first, but it's a workaround for Windows
# multiprocessing communication.
if sys.platform.startswith('win') and \
opts['multiprocessing'] and \
not salt.log.is_logging_configured():
# We have to re-init the logging system for Windows
salt.log.setup_console_logger(log_level=opts.get('log_level', 'info'))
if opts.get('log_file'):
salt.log.setup_logfile_logger(opts['log_file'], opts.get('log_level_logfile', 'info'))
if not minion_instance:
minion_instance = cls(opts)
ret = {