{"size": 807, "ext": "js", "max_stars_repo_path": "server/app/components/winston.js", "max_stars_repo_name": "rayandrews/lime", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "server/app/components/winston.js", "max_issues_repo_name": "rayandrews/lime", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "server/app/components/winston.js", "max_forks_repo_name": "rayandrews/lime", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 21.8108108108, "max_line_length": 68, "alphanum_fraction": 0.624535316}
'use strict';

var winston = require('winston');
var config = require('config');
var pathDir = require('../../../project-path');

winston.addColors({
  error: 'red',
  warn: 'yellow',
  info: 'cyan',
  verbose: 'grey',
  debug: 'blue',
  silly: 'magenta'
});

var logger = new (winston.Logger)({
  transports: [
    new (winston.transports.Console)(config.get('winston.console')),
    new winston.transports.File({
      name: 'error-file',
      filename: pathDir.rootDir + 'log/error.log',
      json: false,
      level: 'error'
    })
  ],
  exceptionHandlers: [
    new (winston.transports.Console)(config.get('winston.console')),
    new winston.transports.File({
      filename: pathDir.rootDir + 'log/exceptions.log',
      json: false
    })
  ],
  exitOnError: false
});

module.exports = logger;
