<commit_before>import tempfile
import logging
import requests

_logger = None

def _get_logger():
    global _logger
    if _logger is not None:
        return _logger
    
    _logger = logging.getLogger("pyvcloud")
    _logger.setLevel(logging.DEBUG)
    handler = logging.FileHandler("%s/pyvcloud.log" % tempfile.gettempdir())
    formatter = logging.Formatter("%(asctime)-22.22s | %(levelname)-5.5s | %(name)-15.15s | %(module)-15.15s | %(funcName)-12.12s | %(message)s")
    handler.setFormatter(formatter)
    _logger.addHandler(handler)
    requests_logger = logging.getLogger("requests.packages.urllib3")
    requests_logger.addHandler(handler)
    requests_logger.setLevel(logging.DEBUG)
    return _logger

class Http(object):
    @staticmethod
    def _log_response(logger, response):
        if logger is not None:
            logger.debug('[%d] %s', response.status_code, response.text)

    @staticmethod
    def get(url, logger=None, **kwargs):
        response = requests.get(url, **kwargs)
        Http._log_response(logger, response)
        return response<commit_msg>Fix length of time string in formatter<commit_after>import tempfile
import logging
import requests

_logger = None

def _get_logger():
    global _logger
    if _logger is not None:
        return _logger
    
    _logger = logging.getLogger("pyvcloud")
    _logger.setLevel(logging.DEBUG)
    handler = logging.FileHandler("%s/pyvcloud.log" % tempfile.gettempdir())
    formatter = logging.Formatter("%(asctime)-23.23s | %(levelname)-5.5s | %(name)-15.15s | %(module)-15.15s | %(funcName)-12.12s | %(message)s")
    handler.setFormatter(formatter)
    _logger.addHandler(handler)
    requests_logger = logging.getLogger("requests.packages.urllib3")
    requests_logger.addHandler(handler)
    requests_logger.setLevel(logging.DEBUG)
    return _logger

class Http(object):
    @staticmethod
    def _log_response(logger, response):
        if logger is not None:
            logger.debug('[%d] %s', response.status_code, response.text)

    @staticmethod
    def get(url, logger=None, **kwargs):
        response = requests.get(url, **kwargs)
        Http._log_response(logger, response)
        return response
{'fraction_non_alphanumeric': 0.12096407457935425, 'fraction_numerical': 0.017280582082764895, 'mean_word_length': 3.6315789473684212, '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': '6096300', 'n_tokens_mistral': 702, 'n_tokens_neox': 679, 'n_words': 139}