control: Add successful configuration file loaded message
Similar to fan monitor, add a configuration loaded successfully message
to the journal for each configuration file loaded into fan control.
Change-Id: I1031a0d31130149309080bd6bb28f319e42509ef
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/control/json/manager.hpp b/control/json/manager.hpp
index 5668138..1534ab0 100644
--- a/control/json/manager.hpp
+++ b/control/json/manager.hpp
@@ -25,7 +25,10 @@
#include "sdbusplus.hpp"
#include "zone.hpp"
+#include <fmt/format.h>
+
#include <nlohmann/json.hpp>
+#include <phosphor-logging/log.hpp>
#include <sdbusplus/bus.hpp>
#include <sdeventplus/event.hpp>
#include <sdeventplus/utility/timer.hpp>
@@ -42,6 +45,7 @@
{
using json = nlohmann::json;
+using namespace phosphor::logging;
/* Application name to be appended to the path for loading a JSON config file */
constexpr auto confAppName = "control";
@@ -203,6 +207,10 @@
std::make_pair(obj->getName(), obj->getProfiles()),
std::move(obj));
}
+ log<level::INFO>(
+ fmt::format("Configuration({}) loaded successfully",
+ T::confFileName)
+ .c_str());
}
return config;
}