Python multiprocessing.util.get_logger() Examples
The following are 8
code examples of multiprocessing.util.get_logger().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
multiprocessing.util
, or try the search function
.
Example #1
Source File: __init__.py From jawfish with MIT License | 5 votes |
def get_logger(): ''' Return package logger -- if it does not already exist then it is created ''' from multiprocessing.util import get_logger return get_logger()
Example #2
Source File: __init__.py From ironpython2 with Apache License 2.0 | 5 votes |
def get_logger(): ''' Return package logger -- if it does not already exist then it is created ''' from multiprocessing.util import get_logger return get_logger()
Example #3
Source File: __init__.py From BinderFilter with MIT License | 5 votes |
def get_logger(): ''' Return package logger -- if it does not already exist then it is created ''' from multiprocessing.util import get_logger return get_logger()
Example #4
Source File: __init__.py From oss-ftp with MIT License | 5 votes |
def get_logger(): ''' Return package logger -- if it does not already exist then it is created ''' from multiprocessing.util import get_logger return get_logger()
Example #5
Source File: __init__.py From Splunking-Crime with GNU Affero General Public License v3.0 | 5 votes |
def get_logger(): ''' Return package logger -- if it does not already exist then it is created ''' from multiprocessing.util import get_logger return get_logger()
Example #6
Source File: __init__.py From PokemonGo-DesktopMap with MIT License | 5 votes |
def get_logger(): ''' Return package logger -- if it does not already exist then it is created ''' from multiprocessing.util import get_logger return get_logger()
Example #7
Source File: __init__.py From unity-python with MIT License | 5 votes |
def get_logger(): ''' Return package logger -- if it does not already exist then it is created ''' from multiprocessing.util import get_logger return get_logger()
Example #8
Source File: spawn.py From loky with BSD 3-Clause "New" or "Revised" License | 4 votes |
def prepare(data): ''' Try to get current process ready to unpickle process object ''' if 'name' in data: process.current_process().name = data['name'] if 'authkey' in data: process.current_process().authkey = data['authkey'] if 'log_to_stderr' in data and data['log_to_stderr']: util.log_to_stderr() if 'log_level' in data: util.get_logger().setLevel(data['log_level']) if 'log_fmt' in data: import logging util.get_logger().handlers[0].setFormatter( logging.Formatter(data['log_fmt']) ) if 'sys_path' in data: sys.path = data['sys_path'] if 'sys_argv' in data: sys.argv = data['sys_argv'] if 'dir' in data: os.chdir(data['dir']) if 'orig_dir' in data: process.ORIGINAL_DIR = data['orig_dir'] if 'mp_tracker_args' in data: from multiprocessing.resource_tracker import ( _resource_tracker as mp_resource_tracker ) mp_resource_tracker._fd = data['mp_tracker_args']['fd'] mp_resource_tracker._pid = data['mp_tracker_args']['pid'] if 'tracker_args' in data: from .resource_tracker import _resource_tracker _resource_tracker._pid = data["tracker_args"]['pid'] if sys.platform == 'win32': handle = data["tracker_args"]["fh"] _resource_tracker._fd = msvcrt.open_osfhandle(handle, 0) else: _resource_tracker._fd = data["tracker_args"]["fd"] if 'init_main_from_name' in data: _fixup_main_from_name(data['init_main_from_name']) elif 'init_main_from_path' in data: _fixup_main_from_path(data['init_main_from_path']) # Multiprocessing module helpers to fix up the main module in # spawned subprocesses