<commit_before>'use strict';

/**
 * Module dependencies.
 */
var fs = require('fs'),
	http = require('http'),
	https = require('https'),
	express = require('express'),
	morgan = require('morgan'),
	bodyParser = require('body-parser'),
	session = require('express-session'),
	compress = require('compression'),
	methodOverride = require('method-override'),
	cookieParser = require('cookie-parser'),
	helmet = require('helmet'),
	passport = require('passport'),
	mongoStore = require('connect-mongo')({
		session: session
	}),
	flash = require('connect-flash'),
	config = require('./config'),
	consolidate = require('consolidate'),
	path = require('path'),
	FileStreamRotator = require('file-stream-rotator'),
	newrelic = require('newrelic');

module.exports = function(db) {
	// Initialize express app
	var app = express();
	var logDirectory = __dirname + '/log';
	
	// ensure log directory exists
	fs.existsSync(logDirectory) || fs.mkdirSync(logDirectory);
	
	// create a rotating write stream
	var accessLogStream = FileStreamRotator.getStream({
	  filename: logDirectory + '/access-%DATE%.log',
	  frequency: 'daily',
	  verbose: false
	});
	
	// setup the logger<commit_msg>se cambio el import de newrelic para que quede en la primer linea<commit_after>'use strict';

/**
 * Module dependencies.
 */
var newrelic = require('newrelic'),
	fs = require('fs'),
	http = require('http'),
	https = require('https'),
	express = require('express'),
	morgan = require('morgan'),
	bodyParser = require('body-parser'),
	session = require('express-session'),
	compress = require('compression'),
	methodOverride = require('method-override'),
	cookieParser = require('cookie-parser'),
	helmet = require('helmet'),
	passport = require('passport'),
	mongoStore = require('connect-mongo')({
		session: session
	}),
	flash = require('connect-flash'),
	config = require('./config'),
	consolidate = require('consolidate'),
	path = require('path'),
	FileStreamRotator = require('file-stream-rotator');

module.exports = function(db) {
	// Initialize express app
	var app = express();
	var logDirectory = __dirname + '/log';
	
	// ensure log directory exists
	fs.existsSync(logDirectory) || fs.mkdirSync(logDirectory);
	
	// create a rotating write stream
	var accessLogStream = FileStreamRotator.getStream({
	  filename: logDirectory + '/access-%DATE%.log',
	  frequency: 'daily',
	  verbose: false
	});
	
	// setup the logger
{'fraction_non_alphanumeric': 0.16279069767441862, 'fraction_numerical': 0.0, 'mean_word_length': 5.007481296758105, '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': '2081637', 'n_tokens_mistral': 732, 'n_tokens_neox': 705, 'n_words': 173}