<commit_before>import logging

def start_logger(output=None, verbose=0):
    """
    Start an instance of Logger for logging

    output : `str`
        output directory (./)

    verbose: `int`
        Verbosity, 0=CRITICAL, 1=WARNING, 2=INFO, 3=DEBUG

    fmt: `str`
        format for logger (None) See logging documentation for details

    """
    # possible levels
    verbose = min(verbose, 3)
    # levels 0, 1, 2, 3
    levels = ['CRITICAL', 'WARNING', 'INFO', 'DEBUG']
    level = levels[verbose]
    fmt = '%(asctime)s - %(name)-8s: %(message)s'
    # setup logger
    logger = logging.getLogger('CPNest')
    logger.setLevel(level)
    # handle command line output
    ch = logging.StreamHandler()
    ch.setFormatter(logging.Formatter(fmt, datefmt='%Y-%m-%d, %H:%M:%S'))
    logger.addHandler(ch)

    if output is not None:
        # log to file
        fh = logging.FileHandler(output + 'cpnest.log')
        fh.setFormatter(logging.Formatter(fmt))
        logger.addHandler(fh)
    print(logger.critical('Logging level: {}'.format(level)))
    return logger<commit_msg>Fix format of log file<commit_after>import logging

def start_logger(output=None, verbose=0):
    """
    Start an instance of Logger for logging

    output : `str`
        output directory (./)

    verbose: `int`
        Verbosity, 0=CRITICAL, 1=WARNING, 2=INFO, 3=DEBUG

    fmt: `str`
        format for logger (None) See logging documentation for details

    """
    # possible levels
    verbose = min(verbose, 3)
    # levels 0, 1, 2, 3
    levels = ['CRITICAL', 'WARNING', 'INFO', 'DEBUG']
    level = levels[verbose]
    fmt = '%(asctime)s - %(name)-8s: %(message)s'
    # setup logger
    logger = logging.getLogger('CPNest')
    logger.setLevel(level)
    # handle command line output
    ch = logging.StreamHandler()
    ch.setFormatter(logging.Formatter(fmt, datefmt='%Y-%m-%d, %H:%M:%S'))
    logger.addHandler(ch)

    if output is not None:
        # log to file
        fh = logging.FileHandler(output + 'cpnest.log')
        fh.setFormatter(logging.Formatter(fmt, datefmt='%Y-%m-%d, %H:%M:%S'))
        logger.addHandler(fh)
    print(logger.critical('Logging level: {}'.format(level)))
    return logger
{'fraction_non_alphanumeric': 0.14259846084200997, 'fraction_numerical': 0.009959257582616569, 'mean_word_length': 2.9676840215439855, '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': '6225799', 'n_tokens_mistral': 742, 'n_tokens_neox': 697, 'n_words': 181}