plugins: Use a log4js logger for npm messages
parent
8a918fbc46
commit
afb025030c
|
@ -1,3 +1,4 @@
|
||||||
|
const log4js = require('log4js');
|
||||||
var plugins = require("ep_etherpad-lite/static/js/pluginfw/plugins");
|
var plugins = require("ep_etherpad-lite/static/js/pluginfw/plugins");
|
||||||
var hooks = require("ep_etherpad-lite/static/js/pluginfw/hooks");
|
var hooks = require("ep_etherpad-lite/static/js/pluginfw/hooks");
|
||||||
var npm = require("npm");
|
var npm = require("npm");
|
||||||
|
@ -9,7 +10,7 @@ const loadNpm = async () => {
|
||||||
if (npmIsLoaded) return;
|
if (npmIsLoaded) return;
|
||||||
await util.promisify(npm.load)({});
|
await util.promisify(npm.load)({});
|
||||||
npmIsLoaded = true;
|
npmIsLoaded = true;
|
||||||
npm.on('log', (message) => console.log('npm: ', message));
|
npm.on('log', log4js.getLogger('npm').log);
|
||||||
};
|
};
|
||||||
|
|
||||||
var tasks = 0
|
var tasks = 0
|
||||||
|
|
Loading…
Reference in New Issue