extract PowerStatusMonitor::handlePowerMatch
Extract this inline lambda into a named function.
Add a debug log statement for easier testing.
Tested: power match is triggered on power state change.
```
ipmitool power on
```
```
Jul 30 14:14:33 s8030-bmc-30303035c0c1 entity-manager[696]: power match triggered
Jul 30 14:14:34 s8030-bmc-30303035c0c1 entity-manager[696]: power match triggered
Jul 30 14:14:34 s8030-bmc-30303035c0c1 entity-manager[696]: power match triggered
Jul 30 14:14:34 s8030-bmc-30303035c0c1 entity-manager[696]: power match triggered
```
It looks like it is triggered multiple times but that has nothing to do
with the changes done in this patch.
Change-Id: If7828a1195565485aeb890223342d6a135da2c46
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/src/entity_manager/power_status_monitor.hpp b/src/entity_manager/power_status_monitor.hpp
index e70031e..0955607 100644
--- a/src/entity_manager/power_status_monitor.hpp
+++ b/src/entity_manager/power_status_monitor.hpp
@@ -14,6 +14,8 @@
const std::shared_ptr<sdbusplus::asio::connection>& conn);
private:
+ void handlePowerMatch(sdbusplus::message_t& message);
+
bool powerStatusOn = false;
std::unique_ptr<sdbusplus::bus::match_t> powerMatch = nullptr;
};