<commit_before>import pymongo
import datetime


class mongolog(object):

    def __init__(self, host='localhost', port=27017):
        self.client = pymongo.MongoClient(host, port)
        self.db = client.log_database
        self.events = self.db.events

    def log_exception(self, ex):
        self.log_event('exception', {'type': type(ex), 'value': str(ex)})<commit_msg>added log<commit_after>import pymongo
import datetime


class mongolog(object):

    def __init__(self, host='localhost', port=27017):
        self.client = pymongo.MongoClient(host, port)
        self.db = self.client.log_database
        self.events = self.db.events

    def log_exception(self, ex):
        self.log_event('exception', {'type': type(ex), 'value': str(ex)})
{'fraction_non_alphanumeric': 0.13715046604527298, 'fraction_numerical': 0.013315579227696404, 'mean_word_length': 3.670807453416149, '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': '1839613', 'n_tokens_mistral': 248, 'n_tokens_neox': 233, 'n_words': 50}