<commit_before>#!/usr/bin/python

import sys, os
from paste.deploy import loadapp, loadserver
from paste import httpserver
import logging

if __name__ == '__main__':
	logging.basicConfig()
	realfile = os.path.realpath(__file__)
	realdir = os.path.dirname(realfile)
	pardir = os.path.realpath(os.path.join(realdir, os.pardir))
	confdir = os.path.join(pardir, 'conf')
	paste_config = os.path.join(confdir, 'paste.config')
	sys.path.append(pardir)
	reporting_app = loadapp('config:' + paste_config)
	server = loadserver('config:' + paste_config)
	server(reporting_app)<commit_msg>Log to /var/log/reporting-api.log<commit_after>#!/usr/bin/python

import sys, os
from paste.deploy import loadapp, loadserver
import logging

if __name__ == '__main__':
	logging.basicConfig(filename = '/var/log/reporting-api.log', level = logging.INFO)
	realfile = os.path.realpath(__file__)
	realdir = os.path.dirname(realfile)
	pardir = os.path.realpath(os.path.join(realdir, os.pardir))
	confdir = os.path.join(pardir, 'conf')
	paste_config = os.path.join(confdir, 'paste.config')
	sys.path.append(pardir)
	reporting_app = loadapp('config:' + paste_config)
	server = loadserver('config:' + paste_config)
	server(reporting_app)
{'fraction_non_alphanumeric': 0.14096185737976782, 'fraction_numerical': 0.0, 'mean_word_length': 5.743016759776537, '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': '1114175', 'n_tokens_mistral': 451, 'n_tokens_neox': 427, 'n_words': 80}