<commit_before>import logging


def create_logger(name):
    """Create and return 'logging' instance."""
    # noinspection SpellCheckingInspection
    formatter = logging.Formatter(fmt='%(asctime)s - %(levelname)s - %(module)s - %(message)s')

    handler = logging.StreamHandler()
    handler.setFormatter(formatter)

    l = logging.getLogger(name)
    l.setLevel(logging.INFO)
    l.addHandler(handler)
    return l<commit_msg>Add wrapper around “logging” library as per self-imposed code rules<commit_after>import logging


class Logger(object):
    """Logger class."""

    # Default logging level
    __default_logging_level = logging.INFO

    # "logging" object
    __l = None

    def __init__(self, name: str):
        """Initialize logger object for a given name."""
        # noinspection SpellCheckingInspection
        formatter = logging.Formatter(fmt='%(asctime)s - %(levelname)s - %(module)s - %(message)s')

        handler = logging.StreamHandler()
        handler.setFormatter(formatter)

        self.__l = logging.getLogger(name)
        self.__l.setLevel(self.__default_logging_level)
        self.__l.addHandler(handler)

    def error(self, message: str) -> None:
        """Log error message."""
        self.__l.error(message)

    def warning(self, message: str) -> None:
        """Log warning message."""
        self.__l.warning(message)

    def info(self, message: str) -> None:
        """Log informational message."""
        self.__l.info(message)

    def debug(self, message: str) -> None:
        """Log debugging message."""
        self.__l.debug(message)


def create_logger(name: str) -> Logger:
    """Create and return Logger object."""
    return Logger(name=name)
{'fraction_non_alphanumeric': 0.13033313851548803, 'fraction_numerical': 0.0, 'mean_word_length': 3.0956937799043063, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, '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': '106559', 'n_tokens_mistral': 510, 'n_tokens_neox': 487, 'n_words': 120}