<commit_before>
var express = require('express');
var http = require('http');
var path = require('path');
var favicon = require('serve-favicon');
var methodOverride = require('method-override');
var session = require('express-session');
var bodyParser = require('body-parser');
var qs = require('querystring');
var multer = require('multer');
var flash = require('connect-flash');
var cookieParser = require('cookie-parser');
var log4js = require('log4js');

var errorHandler = require('errorhandler');
var serveStatic = require('serve-static');
var mongoStore = require('connect-mongo')(session);
var settings = require('./settings');
var cfg = {
//  logLevel:'DEBUG', // TODO add log control
  'ligle-model':{
    upDir:'./public/images/upload/',
    staticDir:'/images/upload/'
  },
  'ligle-db': { 
    db: 'ligleEngine', 
    host: '127.0.0.1', 
    port: 27017
  },
  'ligle-routes': {
  }
};

var ligle = require('ligle-engine')(cfg);

var logger = ligle.util.logger('normal','DEBUG');
// export something to use for other modules
exports.ligle = ligle;
exports.getLogger = ligle.util.logger;


var UPDIR = settings.uploadPath;

// wrap app into callback, so that we can do something before we
// start. such as: open database

ligle.start(function(){
  var app = express();

  // all environments
  app.set('port', process.env.PORT || settings.port);
  app.set('views', path.join(__dirname, 'views'));
  app.set('view engine', 'ejs');


  app.use(favicon(settings.faviconPath ? __dirname + '/public/images/favicon.ico' : ''));
  app.use(methodOverride()); 
  app.use(log4js.connectLogger(logger, {level:log4js.levels.INFO}));<commit_msg>关闭一些引擎底层的log。<commit_after>
var express = require('express');
var http = require('http');
var path = require('path');
var favicon = require('serve-favicon');
var methodOverride = require('method-override');
var session = require('express-session');
var bodyParser = require('body-parser');
var qs = require('querystring');
var multer = require('multer');
var flash = require('connect-flash');
var cookieParser = require('cookie-parser');
var log4js = require('log4js');

var errorHandler = require('errorhandler');
var serveStatic = require('serve-static');
var mongoStore = require('connect-mongo')(session);
var settings = require('./settings');
var cfg = {
//  logLevel:'DEBUG', // TODO add log control
  'ligle-model':{
    upDir:'./public/images/upload/',
    staticDir:'/images/upload/'
  },
  'ligle-db': { 
    db: 'ligleEngine', 
    host: '127.0.0.1', 
    port: 27017
  },
  'ligle-routes': {
  }
};

var ligle = require('ligle-engine')(cfg);

var logger = ligle.util.logger('normal','INFO');
// export something to use for other modules
exports.ligle = ligle;
var getLogger = exports.getLogger = ligle.util.logger;

// to suppress the verbose log
getLogger('ligle-base','INFO');
getLogger('ligle-middware','INFO');
getLogger('ligle-routes','INFO');
getLogger('ligle-model','INFO');
getLogger('ligle-db','INFO');

var UPDIR = settings.uploadPath;

// wrap app into callback, so that we can do something before we
// start. such as: open database

ligle.start(function(){
  var app = express();

  // all environments
  app.set('port', process.env.PORT || settings.port);
  app.set('views', path.join(__dirname, 'views'));
  app.set('view engine', 'ejs');


  app.use(favicon(settings.faviconPath ? __dirname + '/public/images/favicon.ico' : ''));
  app.use(methodOverride()); 
  app.use(log4js.connectLogger(logger, {level:log4js.levels.INFO}));
{'fraction_non_alphanumeric': 0.18080548414738645, 'fraction_numerical': 0.00856898029134533, 'mean_word_length': 4.778877887788779, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '6279033', 'n_tokens_mistral': 1156, 'n_tokens_neox': 1124, 'n_words': 261}