convert ipmi_fru_info_area.cpp to use lg2
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: Ibf3f513d8b7f32d205e912918c67badcc32c6876
diff --git a/ipmi_fru_info_area.cpp b/ipmi_fru_info_area.cpp
index ec3f80d..3cbfb09 100644
--- a/ipmi_fru_info_area.cpp
+++ b/ipmi_fru_info_area.cpp
@@ -1,6 +1,7 @@
#include "ipmi_fru_info_area.hpp"
#include <phosphor-logging/elog.hpp>
+#include <phosphor-logging/lg2.hpp>
#include <algorithm>
#include <ctime>
@@ -144,9 +145,9 @@
}
catch (const std::exception& e)
{
- log<level::ERR>("Could not parse chassis type",
- entry("VALUE=%s", value.c_str()),
- entry("ERROR=%s", e.what()));
+ lg2::error("Could not parse chassis type, value: {VALUE}, "
+ "error: {ERROR}",
+ "VALUE", value, "ERROR", e);
chassisType = 0;
}
}