var log4js = require('log4js');
log4js.configure({
  appenders: {
    out: {
      type: 'stdout'
    }, //设置是否在控制台打印日志
    info: {
      type: 'file',
      filename: __dirname + '/logs/info.log',
      "maxLogSize": 104800,
      "backups": 100,
    }
  },
  categories: {
    default: {
      appenders: ['out', 'info'],
      level: 'info'
    } //去掉'out'。控制台不打印日志
  }
});

var logger = log4js.getLogger('info'); 
var logger2 = log4js.getLogger('console');

module.exports={logger:logger,logger2:logger2};