diff options
author | Alexander Soldatov <a.soldatov@yadro.com> | 2018-04-12 14:40:23 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-04-26 12:53:26 +0000 |
commit | f3c0341bae0b0ccb728ea2842465f3fb8d4bdca4 (patch) | |
tree | 0da1179c5540a8643c51b494779498e5257acc74 | |
parent | 3d2b0d62ed1567ffba53ffb44d0a8617869ea08c (diff) | |
download | phosphor-led-manager-f3c0341bae0b0ccb728ea2842465f3fb8d4bdca4.tar.gz phosphor-led-manager-f3c0341bae0b0ccb728ea2842465f3fb8d4bdca4.zip |
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>
-rw-r--r-- | manager.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/manager.cpp b/manager.cpp index 77ba546..69d82b0 100644 --- a/manager.cpp +++ b/manager.cpp @@ -101,6 +101,7 @@ bool Manager::setGroupState(const std::string& path, bool assert, /** @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 @@ void Manager::driveLEDs(group& ledsAssert, group& ledsDeAssert) // 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); } } |