convert sensordatahandler to use lg2
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: I55ece5e0f6d1d9d7c42f20fbf5ef6495fb879612
diff --git a/sensordatahandler.hpp b/sensordatahandler.hpp
index 1ca488b..f111df1 100644
--- a/sensordatahandler.hpp
+++ b/sensordatahandler.hpp
@@ -8,7 +8,7 @@
#include <ipmid/types.hpp>
#include <ipmid/utils.hpp>
#include <phosphor-logging/elog-errors.hpp>
-#include <phosphor-logging/log.hpp>
+#include <phosphor-logging/lg2.hpp>
#include <sdbusplus/message/types.hpp>
#include <cmath>
@@ -447,7 +447,7 @@
if (rawData > std::numeric_limits<int8_t>::max() ||
rawData < std::numeric_limits<int8_t>::lowest())
{
- log<level::ERR>("Value out of range");
+ lg2::error("Value out of range");
throw std::out_of_range("Value out of range");
}
setReading(static_cast<int8_t>(rawData), &response);
@@ -457,7 +457,7 @@
if (rawData > std::numeric_limits<uint8_t>::max() ||
rawData < std::numeric_limits<uint8_t>::lowest())
{
- log<level::ERR>("Value out of range");
+ lg2::error("Value out of range");
throw std::out_of_range("Value out of range");
}
setReading(static_cast<uint8_t>(rawData), &response);