<commit_before>import logging
import time


class LoggingMixin(object):

    def _log(self, level, msg, *attrs):
        logging.log(level, '%s %s' % (self._log_name, msg), *attrs)

    def _debug(self, msg, *attrs):
        self._log(logging.DEBUG, msg, *attrs)

    def _info(self, msg, *attrs):
        self._log(logging.INFO, msg, *attrs)

    def _warn(self, msg, *attrs):
        self._log(logging.WARNING, msg, *attrs)

    def _yield_warning_screen(self, seconds=None):
        last_warning = None
        for elapsed_time in _yield_elapsed_time(seconds):
            try:
                yield elapsed_time
            except Exception as warning:
                warning = str(warning)
                if last_warning != warning:
                    last_warning = warning
                    self._warn(warning)
                time.sleep(1)
<commit_msg>Adds logging to namespace. This allows users to selectively control the module's logging behavior independent of the global logging behavior.<commit_after>import logging
import time

logger = logging.getLogger("socketIO-client")
logger.addHandler(logging.NullHandler())

class LoggingMixin(object):

    def _log(self, level, msg, *attrs):
        logging.log(level, '%s %s' % (self._log_name, msg), *attrs)

    def _debug(self, msg, *attrs):
        self._log(logging.DEBUG, msg, *attrs)

    def _info(self, msg, *attrs):
        self._log(logging.INFO, msg, *attrs)

    def _warn(self, msg, *attrs):
        self._log(logging.WARNING, msg, *attrs)

    def _yield_warning_screen(self, seconds=None):
        last_warning = None
        for elapsed_time in _yield_elapsed_time(seconds):
            try:
                yield elapsed_time
            except Exception as warning:
                warning = str(warning)
                if last_warning != warning:
                    last_warning = warning
                    self._warn(warning)
                time.sleep(1)

{'fraction_non_alphanumeric': 0.10179948586118252, 'fraction_numerical': 0.0010282776349614395, 'mean_word_length': 2.2871621621621623, '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': '1323818', 'n_tokens_mistral': 573, 'n_tokens_neox': 539, 'n_words': 148}