Changed plugin version mismatch log level to error #4866

This commit is contained in:
Jerry (Xinyu Hou) 2015-07-16 14:25:03 -07:00
parent 6602ebe435
commit dc72b4e512
2 changed files with 5 additions and 5 deletions

View File

@ -87,16 +87,16 @@ ArchPluginUnix::load()
String pluginName = filename.substr(pos + 3); String pluginName = filename.substr(pos + 3);
char* version = (char*)invoke(filename.c_str(), "version", NULL, library); char* version = (char*)invoke(filename.c_str(), "version", NULL, library);
String expectedVersion(pluginVersion(pluginName.c_str())); String expectedVersion(pluginVersion(pluginName.c_str()));
if (version != NULL && expectedVersion.compare(version) == 0) { if (version != NULL && expectedVersion.compare(version) == 0) {
LOG((CLOG_DEBUG "loaded plugin: %s (%s)", (*it).c_str(), version)); LOG((CLOG_DEBUG "loaded plugin: %s (%s)", (*it).c_str(), version));
m_pluginTable.insert(std::make_pair(filename, library)); m_pluginTable.insert(std::make_pair(filename, library));
} }
else { else {
LOG((CLOG_WARN "plugin version doesn't match")); LOG((CLOG_ERR "plugin version doesn't match"));
LOG((CLOG_DEBUG "expected plugin version: %s actual plugin version: %s", LOG((CLOG_DEBUG "expected plugin version: %s actual plugin version: %s",
expectedVersion.c_str(), version)); expectedVersion.c_str(), version));
LOG((CLOG_WARN "skip plugin: %s", (*it).c_str())); LOG((CLOG_ERR "skip plugin: %s", (*it).c_str()));
dlclose(library); dlclose(library);
} }
} }

View File

@ -78,10 +78,10 @@ ArchPluginWindows::load()
m_pluginTable.insert(std::make_pair(pluginName, lib)); m_pluginTable.insert(std::make_pair(pluginName, lib));
} }
else { else {
LOG((CLOG_WARN "plugin version doesn't match")); LOG((CLOG_ERR "plugin version doesn't match"));
LOG((CLOG_DEBUG "expected plugin version: %s actual plugin version: %s", LOG((CLOG_DEBUG "expected plugin version: %s actual plugin version: %s",
expectedVersion.c_str(), version)); expectedVersion.c_str(), version));
LOG((CLOG_WARN "skip plugin: %s", (*it).c_str())); LOG((CLOG_ERR "skip plugin: %s", (*it).c_str()));
FreeLibrary(library); FreeLibrary(library);
} }
} }