<commit_before># -*- coding: utf-8 -*-
import logging

logging.basicConfig(level='INFO')

try:
    from drift.flaskfactory import drift_app
    app = drift_app()
except Exception:
    logging.exception("Can't create Drift app object.")
<commit_msg>Update serverless app module with proper logging set up<commit_after># -*- coding: utf-8 -*-
import logging


# The logger is already configured at this point by the lambda thunker so we need to reset it.
root = logging.getLogger()
if root.handlers:
    for handler in root.handlers:
        root.removeHandler(handler)

logging.basicConfig(format='[%(levelname)s] %(name)s: %(message)s', level=logging.INFO)


try:
    from drift.flaskfactory import drift_app
    app = drift_app()
except Exception:
    logging.exception("Can't create Drift app object.")

{'fraction_non_alphanumeric': 0.11180124223602485, 'fraction_numerical': 0.002484472049689441, 'mean_word_length': 4.233766233766234, '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': '7106985', 'n_tokens_mistral': 242, 'n_tokens_neox': 236, 'n_words': 78}