<commit_before>## Logger

import logging
import datetime

class LoggerFactory:
    def __init__(self, debugMode=False):
        self._debugMode = debugMode

        dateString = str(
            datetime.datetime.strftime(datetime.datetime.utcnow(),
                                       '%Y%m%d_%H%M%S'))

        debugLogFilename = "logs/debug_"+dateString+".log"
        infoLogFilename = "logs/info_"+dateString+".log"
        errorLogFilename = "logs/error_"+dateString+".log"

        self._formatter = logging.Formatter(
            "%(asctime)s   %(name)-17s %(levelname)-8s %(message)s",
            "%Y-%m-%d %H:%M:%S")

        self._commandLineHandler = logging.StreamHandler()
        self._commandLineHandler.setLevel(logging.DEBUG)
        self._commandLineHandler.setFormatter(self._formatter)
        logging.getLogger("NQr").addHandler(self._commandLineHandler)

        if self._debugMode == True:
            debugFileHandler = logging.FileHandler(debugLogFilename, delay=True)
            debugFileHandler.setLevel(logging.DEBUG)
            debugFileHandler.setFormatter(self._formatter)
            logging.getLogger("NQr").addHandler(debugFileHandler)<commit_msg>Formatted logger to be more readable for critical errors.<commit_after>## Logger

import logging
import datetime

class LoggerFactory:
    def __init__(self, debugMode=False):
        self._debugMode = debugMode

        dateString = str(
            datetime.datetime.strftime(datetime.datetime.utcnow(),
                                       '%Y%m%d_%H%M%S'))

        debugLogFilename = "logs/debug_"+dateString+".log"
        infoLogFilename = "logs/info_"+dateString+".log"
        errorLogFilename = "logs/error_"+dateString+".log"

        self._formatter = logging.Formatter(
            "%(asctime)s   %(name)-17s %(levelname)-10s %(message)s",
            "%Y-%m-%d %H:%M:%S")

        self._commandLineHandler = logging.StreamHandler()
        self._commandLineHandler.setLevel(logging.DEBUG)
        self._commandLineHandler.setFormatter(self._formatter)
        logging.getLogger("NQr").addHandler(self._commandLineHandler)

        if self._debugMode == True:
            debugFileHandler = logging.FileHandler(debugLogFilename, delay=True)
            debugFileHandler.setLevel(logging.DEBUG)
            debugFileHandler.setFormatter(self._formatter)
            logging.getLogger("NQr").addHandler(debugFileHandler)
{'fraction_non_alphanumeric': 0.11937216026435357, 'fraction_numerical': 0.0028913672036348617, 'mean_word_length': 2.808176100628931, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4340879', 'n_tokens_mistral': 694, 'n_tokens_neox': 670, 'n_words': 97}