convert sensordatahandler to use lg2
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: I55ece5e0f6d1d9d7c42f20fbf5ef6495fb879612
diff --git a/sensordatahandler.cpp b/sensordatahandler.cpp
index 1752bd6..45e3835 100644
--- a/sensordatahandler.cpp
+++ b/sensordatahandler.cpp
@@ -40,7 +40,7 @@
}
catch (const InternalFailure& e)
{
- log<level::ERR>("Error in D-Bus call", entry("ERROR=%s", e.what()));
+ lg2::error("Error in D-Bus call: {ERROR}", "ERROR", e);
commit<InternalFailure>();
return IPMI_CC_UNSPECIFIED_ERROR;
}
@@ -211,7 +211,7 @@
const auto& iter = std::get<OffsetValueMap>(property.second).find(data);
if (iter == std::get<OffsetValueMap>(property.second).end())
{
- log<level::ERR>("Invalid event data");
+ lg2::error("Invalid event data");
return IPMI_CC_PARM_OUT_OF_RANGE;
}
msg.append(iter->second.assert);