<commit_before>var config = require('./config');
var winston = require('winston');


var logger = new(winston.Logger)({
  transports: [
    new(winston.transports.File)({
      name: 'info',
      filename: 'logFiles/info.log',
      level: 'info'
    }),
    new(winston.transports.File)({
      name: 'debug',
      filename: 'logFiles/debug.log',
      level: 'debug'
    }),
    new(winston.transports.File)({
      name: 'error',
      filename: 'logFiles/error.log',
      level: 'error',
      handleExceptions: true,
      humanReadableUnhandledException: true
    }),
    new(winston.transports.Console)({
      name: 'console',
      level: 'debug',
      colorize: true,
      handleExceptions: true,
      humanReadableUnhandledException: true
    })
  ]
});

logger.handleExceptions(new winston.transports.File({
  filename: 'logFiles/exceptions.log'
}));

logger.logException = true;

module.exports = logger;<commit_msg>Update so console logging is set in config file.<commit_after>var config = require('./config');
var winston = require('winston');


var logger = new(winston.Logger)({
  transports: [
    new(winston.transports.File)({
      name: 'info',
      filename: 'logFiles/info.log',
      level: 'info'
    }),
    new(winston.transports.File)({
      name: 'debug',
      filename: 'logFiles/debug.log',
      level: 'debug'
    }),
    new(winston.transports.File)({
      name: 'error',
      filename: 'logFiles/error.log',
      level: 'error',
      handleExceptions: true,
      humanReadableUnhandledException: true
    }),
    new(winston.transports.Console)({
      name: 'console',
      level: config.logger.level,
      colorize: true,
      handleExceptions: true,
      humanReadableUnhandledException: true
    })
  ]
});

logger.handleExceptions(new winston.transports.File({
  filename: 'logFiles/exceptions.log'
}));

logger.logException = true;

module.exports = logger;
{'fraction_non_alphanumeric': 0.1476264997391758, 'fraction_numerical': 0.0, 'mean_word_length': 3.0808510638297872, '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': '7501094', 'n_tokens_mistral': 626, 'n_tokens_neox': 610, 'n_words': 115}