<commit_before>import logging
import sys

DEFAULT_LEVEL = logging.DEBUG

root = logging.getLogger()
ch = logging.StreamHandler(sys.stdout)

formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
ch.setFormatter(formatter)
root.addHandler(ch)
root.setLevel(DEFAULT_LEVEL)

# Make an exception for boto and bravado: its debug level is just too verbose...
logging.getLogger('boto').setLevel(logging.INFO)
logging.getLogger('bravado_core.spec').setLevel(logging.INFO)
logging.getLogger('swagger_spec_validator.ref_validators').setLevel(logging.INFO)


def get_logger():
    global root
    return root

def set_level(newlevel):
    global root
    root.setLevel(newlevel)<commit_msg>Set amqp's log level to INFO to avoid seeing heartbeat logs from celery workers<commit_after>import logging
import sys

DEFAULT_LEVEL = logging.DEBUG

root = logging.getLogger()
ch = logging.StreamHandler(sys.stdout)

formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
ch.setFormatter(formatter)
root.addHandler(ch)
root.setLevel(DEFAULT_LEVEL)

# Make an exception for boto and bravado: its debug level is just too verbose...
logging.getLogger('boto').setLevel(logging.INFO)
logging.getLogger('bravado_core.spec').setLevel(logging.INFO)
logging.getLogger('amqp').setLevel(logging.INFO)
logging.getLogger('swagger_spec_validator.ref_validators').setLevel(logging.INFO)


def get_logger():
    global root
    return root

def set_level(newlevel):
    global root
    root.setLevel(newlevel)
{'fraction_non_alphanumeric': 0.11986970684039087, 'fraction_numerical': 0.0, 'mean_word_length': 5.918918918918919, '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': '6780846', 'n_tokens_mistral': 497, 'n_tokens_neox': 482, 'n_words': 105}