Hide debugging printouts regarding LED assertion
Change the printouts from cout to log<level::DEBUG>
The rest of led manager already logs to phosphor-logging
and only these assertion/deassertion messages were
going to cout.
Change-Id: I9b284221592ac6b48d749acd2f3dfe2d07d4e454
Signed-off-by: Alexander Soldatov <a.soldatov@yadro.com>
Signed-off-by: Alexander Amelkin <a.amelkin@yadro.com>
diff --git a/manager.cpp b/manager.cpp
index 77ba546..69d82b0 100644
--- a/manager.cpp
+++ b/manager.cpp
@@ -101,6 +101,7 @@
/** @brief Run through the map and apply action on the LEDs */
void Manager::driveLEDs(group& ledsAssert, group& ledsDeAssert)
{
+ using namespace phosphor::logging;
// Map of physical LED dbus paths to their Service providers
populateObjectMap();
@@ -113,20 +114,20 @@
// This order of LED operation is important.
if (ledsDeAssert.size())
{
- std::cout << "De-Asserting LEDs" << std::endl;
for (const auto& it: ledsDeAssert)
{
std::string objPath = std::string(PHY_LED_PATH) + it.name;
+ log<level::DEBUG>("De-Asserting LED", entry("NAME=%s", it.name.c_str()));
drivePhysicalLED(objPath, Layout::Action::Off, it.dutyOn);
}
}
if(ledsAssert.size())
{
- std::cout << "Asserting LEDs" << std::endl;
for (const auto& it: ledsAssert)
{
std::string objPath = std::string(PHY_LED_PATH) + it.name;
+ log<level::DEBUG>("Asserting LED", entry("NAME=%s", it.name.c_str()));
drivePhysicalLED(objPath, it.action, it.dutyOn);
}
}