<commit_before>import sys
from functools import wraps
from flask import Flask, request, jsonify, make_response

from taxii.exceptions import StatusMessageException, raise_failure, StatusFailureMessage

from taxii.status import process_status_exception
from taxii.services import InboxService, DiscoveryService
from taxii.http import REQUIRED_RESPONSE_HEADERS, get_headers

from settings import *


app = Flask(__name__)

inbox_service = InboxService(DOMAIN_NAME + '/services/inbox/')
discovery_service = DiscoveryService(DOMAIN_NAME + '/services/discovery/', services=[inbox_service])

services = [inbox_service, discovery_service]


def view_wrapper(service):

    @wraps(service.view)
    def wrapper(*args, **kwargs):

        if 'application/xml' not in request.accept_mimetypes:
            raise_failure("The specified value of Accept is not supported")

        response_message = service.view(request.headers, request.data)<commit_msg>logging tweak<commit_after>import sys
from functools import wraps
from flask import Flask, request, jsonify, make_response

from taxii.exceptions import StatusMessageException, raise_failure, StatusFailureMessage

from taxii.status import process_status_exception
from taxii.services import InboxService, DiscoveryService
from taxii.http import REQUIRED_RESPONSE_HEADERS, get_headers

from settings import *

import logging
logging.basicConfig()

app = Flask(__name__)

inbox_service = InboxService(DOMAIN_NAME + '/services/inbox/')
discovery_service = DiscoveryService(DOMAIN_NAME + '/services/discovery/', services=[inbox_service])

services = [inbox_service, discovery_service]


def view_wrapper(service):

    @wraps(service.view)
    def wrapper(*args, **kwargs):

        if 'application/xml' not in request.accept_mimetypes:
            raise_failure("The specified value of Accept is not supported")

        response_message = service.view(request.headers, request.data)
{'fraction_non_alphanumeric': 0.07852314092563703, 'fraction_numerical': 0.0, 'mean_word_length': 5.680555555555555, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '1711303', 'n_tokens_mistral': 552, 'n_tokens_neox': 530, 'n_words': 143}