<commit_before>import logging.config
import os


def setup_logging(level="DEBUG",
                  base_dir=None, directory="log",
                  filename=None):
    if filename is None:
        filename = "log"

    if base_dir is None:
        base_dir = ""

    filename = base_dir + directory + "/" + filename + ".log"

    if not os.path.exists(base_dir + directory):
        os.makedirs(base_dir + directory)

    format = '%(asctime)s-[%(levelname)-8s]-%(name)-30s: %(message)s'

    log_config = {
        'version': 1,
        'disable_existing_loggers': False,
        'formatters': {
            'standard': {
                'format': format
            },
        },
        'handlers': {
            'default': {
                'level': "DEBUG",
                'class': 'logging.handlers.TimedRotatingFileHandler',
                'filename': filename,
                'when': 'midnight',
                'formatter': 'standard'
            },
        },
        'loggers': {
            '': {
                'handlers': ['default'],
                'level': level,
                'propagate': True
            }<commit_msg>using non-keyword as variable name<commit_after>import logging.config
import os


def setup_logging(level="DEBUG",
                  base_dir=None, directory="log",
                  filename=None):
    if filename is None:
        filename = "log"

    if base_dir is None:
        base_dir = ""

    filename = base_dir + directory + "/" + filename + ".log"

    if not os.path.exists(base_dir + directory):
        os.makedirs(base_dir + directory)

    fmt = '%(asctime)s-[%(levelname)-8s]-%(name)-30s: %(message)s'

    log_config = {
        'version': 1,
        'disable_existing_loggers': False,
        'formatters': {
            'standard': {
                'format': fmt
            },
        },
        'handlers': {
            'default': {
                'level': "DEBUG",
                'class': 'logging.handlers.TimedRotatingFileHandler',
                'filename': filename,
                'when': 'midnight',
                'formatter': 'standard'
            },
        },
        'loggers': {
            '': {
                'handlers': ['default'],
                'level': level,
                'propagate': True
            }
{'fraction_non_alphanumeric': 0.13827481577806675, 'fraction_numerical': 0.0034677069787602947, 'mean_word_length': 1.4817204301075269, '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': '5607621', 'n_tokens_mistral': 677, 'n_tokens_neox': 637, 'n_words': 128}