Added extra logging to plugin loaders #4168

This commit is contained in:
Nick Bolton
2015-02-26 00:03:24 +00:00
parent 64c350fd96
commit bcf1a1c4d4
2 changed files with 6 additions and 2 deletions

View File

@@ -56,16 +56,19 @@ ArchPluginWindows::load()
std::vector<String>::iterator it;
for (it = plugins.begin(); it != plugins.end(); ++it) {
LOG((CLOG_DEBUG "loading plugin: %s", (*it).c_str()));
String path = String(getPluginsDir()).append("\\").append(*it);
String path = String(dir).append("\\").append(*it);
HINSTANCE library = LoadLibrary(path.c_str());
if (library == NULL) {
LOG((CLOG_ERR "failed to load plugin: %s %d", (*it).c_str(), GetLastError()));
throw XArch(new XArchEvalWindows);
}
void* lib = reinterpret_cast<void*>(library);
String filename = synergy::string::removeFileExt(*it);
m_pluginTable.insert(std::make_pair(filename, lib));
LOG((CLOG_ERR "loaded plugin: %s", (*it).c_str()));
}
}