mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 23:46:14 -04:00
plugins: Move plugin logging to plugins.update()
This commit is contained in:
parent
595697bc8a
commit
16f84ba3d3
2 changed files with 7 additions and 8 deletions
|
@ -48,7 +48,6 @@ const UpdateCheck = require('./utils/UpdateCheck');
|
||||||
const db = require('./db/DB');
|
const db = require('./db/DB');
|
||||||
const express = require('./hooks/express');
|
const express = require('./hooks/express');
|
||||||
const hooks = require('../static/js/pluginfw/hooks');
|
const hooks = require('../static/js/pluginfw/hooks');
|
||||||
const pluginDefs = require('../static/js/pluginfw/plugin_defs');
|
|
||||||
const plugins = require('../static/js/pluginfw/plugins');
|
const plugins = require('../static/js/pluginfw/plugins');
|
||||||
const {Gate} = require('./utils/promises');
|
const {Gate} = require('./utils/promises');
|
||||||
const stats = require('./stats');
|
const stats = require('./stats');
|
||||||
|
@ -134,13 +133,6 @@ exports.start = async () => {
|
||||||
|
|
||||||
await db.init();
|
await db.init();
|
||||||
await plugins.update();
|
await plugins.update();
|
||||||
const installedPlugins = Object.values(pluginDefs.plugins)
|
|
||||||
.filter((plugin) => plugin.package.name !== 'ep_etherpad-lite')
|
|
||||||
.map((plugin) => `${plugin.package.name}@${plugin.package.version}`)
|
|
||||||
.join(', ');
|
|
||||||
logger.info(`Installed plugins: ${installedPlugins}`);
|
|
||||||
logger.debug(`Installed parts:\n${plugins.formatParts()}`);
|
|
||||||
logger.debug(`Installed server-side hooks:\n${plugins.formatHooks('hooks', false)}`);
|
|
||||||
await hooks.aCallAll('loadSettings', {settings});
|
await hooks.aCallAll('loadSettings', {settings});
|
||||||
await hooks.aCallAll('createServer');
|
await hooks.aCallAll('createServer');
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
|
@ -102,6 +102,13 @@ exports.update = async () => {
|
||||||
const logger = log4js.getLogger(`plugin:${p}`);
|
const logger = log4js.getLogger(`plugin:${p}`);
|
||||||
await hooks.aCallAll(`init_${p}`, {logger});
|
await hooks.aCallAll(`init_${p}`, {logger});
|
||||||
}));
|
}));
|
||||||
|
const installedPlugins = Object.values(defs.plugins)
|
||||||
|
.filter((plugin) => plugin.package.name !== 'ep_etherpad-lite')
|
||||||
|
.map((plugin) => `${plugin.package.name}@${plugin.package.version}`)
|
||||||
|
.join(', ');
|
||||||
|
logger.info(`Installed plugins: ${installedPlugins}`);
|
||||||
|
logger.debug(`Installed parts:\n${exports.formatParts()}`);
|
||||||
|
logger.debug(`Installed server-side hooks:\n${exports.formatHooks('hooks', false)}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.getPackages = async () => {
|
exports.getPackages = async () => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue