Improve plugin related logging

This commit is contained in:
TheAssassin
2018-08-28 15:44:17 +02:00
parent ec051c3e0c
commit 4a098896a9

View File

@@ -214,8 +214,10 @@ int main(int argc, char** argv) {
for (const auto& pluginName : inputPlugins.Get()) {
auto it = foundPlugins.find(std::string(pluginName));
ldLog() << std::endl << "-- Running input plugin:" << pluginName << "--" << std::endl;
if (it == foundPlugins.end()) {
ldLog() << std::endl << LD_ERROR << "Could not find plugin:" << pluginName;
ldLog() << LD_ERROR << "Could not find plugin:" << pluginName;
return 1;
}
@@ -230,8 +232,6 @@ int main(int argc, char** argv) {
return 1;
}
ldLog() << std::endl << "-- Running input plugin:" << pluginName << "--" << std::endl;
auto retcode = plugin->run(appDir.path());
if (retcode != 0) {
@@ -294,8 +294,10 @@ int main(int argc, char** argv) {
for (const auto& pluginName : outputPlugins.Get()) {
auto it = foundPlugins.find(std::string(pluginName));
ldLog() << std::endl << "-- Running output plugin:" << pluginName << "--" << std::endl;
if (it == foundPlugins.end()) {
ldLog() << std::endl << LD_ERROR << "Could not find plugin:" << pluginName;
ldLog() << LD_ERROR << "Could not find plugin:" << pluginName;
return 1;
}
@@ -310,8 +312,6 @@ int main(int argc, char** argv) {
return 1;
}
ldLog() << std::endl << "-- Running output plugin:" << pluginName << "--" << std::endl;
auto retcode = plugin->run(appDir.path());
if (retcode != 0) {