<commit_before>import logging, re, time, copy
from threading import Lock
from .client import OvirtClient,getOrFail,getOrNone
from .hostready import JonBCHostReady
import json
from .defaults import VM_DEFAULT, FOREMAN_DEFAULT
from .util import run_parallel, run_parallel_bool

class AttrResolveException(Exception):
    pass

class Uberforeman(object):

    def __init__(self,foreman,setup,name,hostDefaults={}):
        self.log = logging.getLogger("Foreman")
        self.log.setLevel(logging.INFO)
        ch = logging.StreamHandler()
        ch.setLevel(logging.INFO)
        formatter = logging.Formatter('%(levelname)s: %(message)s')
        ch.setFormatter(formatter)
        self.log.addHandler(ch)
        self.foreman = foreman
        self.vmChecker = JonBCHostReady(foreman)
        self.setup = setup
        self.name = name
        self._applyDefaults(hostDefaults)
        self._validateSetup()<commit_msg>fix mutlilogging when more ctrl instances<commit_after>import logging, re, time, copy
from threading import Lock
from .client import OvirtClient,getOrFail,getOrNone
from .hostready import JonBCHostReady
import json
from .defaults import VM_DEFAULT, FOREMAN_DEFAULT
from .util import run_parallel, run_parallel_bool

class AttrResolveException(Exception):
    pass

class Uberforeman(object):

    def __init__(self,foreman,setup,name,hostDefaults={}):
        self.log = logging.getLogger("Foreman")
        self.log.setLevel(logging.INFO)
        if len(self.log.handlers) == 0:
            ch = logging.StreamHandler()
            ch.setLevel(logging.INFO)
            formatter = logging.Formatter('%(levelname)s: %(message)s')
            ch.setFormatter(formatter)
            self.log.addHandler(ch)
        self.foreman = foreman
        self.vmChecker = JonBCHostReady(foreman)
        self.setup = setup
        self.name = name
        self._applyDefaults(hostDefaults)
        self._validateSetup()
{'fraction_non_alphanumeric': 0.09274611398963731, 'fraction_numerical': 0.0005181347150259067, 'mean_word_length': 3.3886363636363637, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1847932', 'n_tokens_mistral': 572, 'n_tokens_neox': 558, 'n_words': 121}