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'); 

参考:

posted @ 2020-11-13 13:05  林宇风  阅读(1017)  评论(0编辑  收藏  举报