Browse Source

Log plugin loading before attempting to load plugin, in case it crashes Rack.

tags/v2.0.0
Andrew Belt 3 years ago
parent
commit
ed11f116b3
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      src/plugin.cpp

+ 6
- 1
src/plugin.cpp View File

@@ -102,6 +102,11 @@ static InitCallback loadPluginCallback(Plugin* plugin) {

/** If path is blank, loads Core */
static Plugin* loadPlugin(std::string path) {
if (path == "")
INFO("Loading Core plugin");
else
INFO("Loading plugin from %s", path.c_str());

Plugin* plugin = new Plugin;
try {
// Set plugin path
@@ -158,8 +163,8 @@ static Plugin* loadPlugin(std::string path) {
return NULL;
}

INFO("Loaded %s v%s", plugin->slug.c_str(), plugin->version.c_str());
plugins.push_back(plugin);
INFO("Loaded plugin %s v%s from %s", plugin->slug.c_str(), plugin->version.c_str(), plugin->path.c_str());
return plugin;
}



Loading…
Cancel
Save