Commit f6ac60c2 authored by Micha Mueller's avatar Micha Mueller
Browse files

Minor changes to log messages

parent a2532482
......@@ -164,7 +164,7 @@ bool Configuration::read() {
LOG(info) << pluginConfig << " found";
dynLib.DL = dlopen(pluginLib.c_str(), RTLD_NOW);
if(!dynLib.DL) {
LOG(error) << "Cannot load " << plugin.second.data() << "-library: " << dlerror();
LOG(error) << "Cannot load " << dynLib.id << "-library: " << dlerror();
return false;
}
//reset errors
......@@ -174,14 +174,14 @@ bool Configuration::read() {
dynLib.create = (create_t*) dlsym(dynLib.DL, "create");
const char* dlsym_error = dlerror();
if (dlsym_error) {
LOG(error) << "Cannot load symbol create for " << plugin.second.data() << ": " << dlsym_error;
LOG(error) << "Cannot load symbol create for " << dynLib.id << ": " << dlsym_error;
return false;
}
dynLib.destroy = (destroy_t*) dlsym(dynLib.DL, "destroy");
dlsym_error = dlerror();
if (dlsym_error) {
LOG(error) << "Cannot load symbol destroy for " << plugin.second.data() << ": " << dlsym_error;
LOG(error) << "Cannot load symbol destroy for " << dynLib.id << ": " << dlsym_error;
return false;
}
......@@ -190,13 +190,13 @@ bool Configuration::read() {
dynLib.configurator->setGlobalSettings(_global);
//read in config
if (!(dynLib.configurator->readConfig(pluginConfig))) {
LOG(error) << "Plugin \"" << plugin.second.data() << "\" could not read configuration!";
LOG(error) << "Plugin \"" << dynLib.id << "\" could not read configuration!";
return false;
}
// returning an empty vector sensor may indicate problems with the config file
if(dynLib.configurator->getSensors().size() == 0) {
LOG(warning) << "Plugin \"" << plugin.second.data() << "\" created no sensors!";
LOG(warning) << "Plugin \"" << dynLib.id << "\" created no sensors!";
}
//save only pointers to the sensors; copy-constructing an dynamically loaded object may lead to segfaults
......@@ -211,7 +211,7 @@ bool Configuration::read() {
//save dl-struct
_plugins.push_back(dynLib);
LOG(info) << "Plugin \"" << plugin.second.data() << "\" loaded!";
LOG(info) << "Plugin \"" << dynLib.id << "\" loaded!";
} else {
LOG(info) << pluginConfig << " not found. Omitting";
}
......
......@@ -343,5 +343,6 @@ int main(int argc, char** argv) {
httpsServer.stop();
restThread.join();
LOG(info) << "Exiting...Goodbye!";
return 0;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment