nodejs日志打印log4js
安装
npm install log4js
使用
var log4js = require('log4js');
var logger = log4js.getLogger();
logger.level = 'info';
logger.debug('this is debug');
logger.info('this is info');
logger.warn('this is warn');
logger.error('this is error');
参考: