Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Adding debug logs on successful plugin loads #10100

Merged
merged 2 commits into from Mar 20, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions lib/config/plugins.js
Expand Up @@ -120,6 +120,17 @@ class Plugins {
throw pluginLoadErr;
}

// This step is costly, so skip if debug is disabled
if (debug.enabled) {
try {
const version = require(`${longName}/package.json`).version;

debug(`Loaded plugin ${pluginName} (${longName}@${version})`);
} catch (e) {
debug(`Loaded plugin ${pluginName} (${longName}, version unknown)`);
}
}

this.define(pluginName, plugin);
}
}
Expand Down