monitor: Change power off rule trace order
When starting a power off action, trace it before starting it so if the
action traces something too this trace comes first.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Iae7a196422e9c629098e587e31cb01f2f15eabb3
diff --git a/monitor/power_off_rule.hpp b/monitor/power_off_rule.hpp
index f28dce6..72d0052 100644
--- a/monitor/power_off_rule.hpp
+++ b/monitor/power_off_rule.hpp
@@ -83,11 +83,12 @@
if (!_active && satisfied)
{
// Start the action
- _active = true;
- _action->start();
getLogger().log(fmt::format(
"Starting shutdown action '{}' due to cause '{}'",
_action->name(), _cause->name()));
+
+ _active = true;
+ _action->start();
}
else if (_active && !satisfied)
{