def main():

    def configure_logging():
        logging_config = {'formatters': {'f': {'format':
            '%(processName)-10s %(name)s %(levelname)-8s %(message)s'}},
            'handlers': {'h': {'level': 'INFO', 'class':
            'logging.StreamHandler', 'formatter': 'f'}}, 'loggers': {'': {
            'handlers': ['h'], 'level': 'INFO', 'propagate': True}},
            'version': 1}
pname = mp.current_process().name
if pname != 'MainProcess':
    logging_config['handlers'] = {'h': {'level': 'INFO', 'formatter': 'f',
        'class': 'logging.FileHandler', 'filename': pname + '.log'}}
How can I prevent the inheritance of python loggers and handlers during multiprocessing based on fork?