plugins: Use a log4js logger for npm messages

This commit is contained in:
Richard Hansen 2020-11-13 14:32:00 -05:00 committed by John McLear
parent 8a918fbc46
commit afb025030c
1 changed files with 2 additions and 1 deletions

View File

@ -1,3 +1,4 @@
const log4js = require('log4js');
var plugins = require("ep_etherpad-lite/static/js/pluginfw/plugins");
var hooks = require("ep_etherpad-lite/static/js/pluginfw/hooks");
var npm = require("npm");
@ -9,7 +10,7 @@ const loadNpm = async () => {
if (npmIsLoaded) return;
await util.promisify(npm.load)({});
npmIsLoaded = true;
npm.on('log', (message) => console.log('npm: ', message));
npm.on('log', log4js.getLogger('npm').log);
};
var tasks = 0