<commit_before>import logging

_loglevels = {
    'debug': logging.DEBUG,
    'info': logging.INFO,
    'warn': logging.WARNING,
    'error': logging.ERROR,
    'critical': logging.CRITICAL,
}


log = logging.getLogger('bukget')
hdlr = logging.FileHandler('bukget.log')
formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s')
hdlr.setFormatter(formatter)
log.setLevel(_loglevels['debug'])
log.addHandler(hdlr)<commit_msg>Logging info should now come from the config.<commit_after>import logging
from config import config

_loglevels = {
    'debug': logging.DEBUG,
    'info': logging.INFO,
    'warn': logging.WARNING,
    'error': logging.ERROR,
    'critical': logging.CRITICAL,
}


log = logging.getLogger('bukget')
hdlr = logging.FileHandler(config.get('Settings', 'log_file'))
formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s')
hdlr.setFormatter(formatter)
log.setLevel(_loglevels[config.get('Settings', 'log_level')])
log.addHandler(hdlr)
{'fraction_non_alphanumeric': 0.15918367346938775, 'fraction_numerical': 0.0, 'mean_word_length': 5.8125, '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': '6458393', 'n_tokens_mistral': 339, 'n_tokens_neox': 328, 'n_words': 60}