PEL: Changing the remaining traces to lg2 style
Some of the logging traces of PEL files still uses old style of logging.
Changing the remaining traces in PEL files to lg2 style of logging.Some
of the traces in phosphor logging code which use the old style is also
considered.
Change-Id: I0daf9589af443881cb61730047c23db17fdec2c3
Signed-off-by: Arya K Padman <aryakpadman@gmail.com>
diff --git a/extensions/openpower-pels/fru_identity.cpp b/extensions/openpower-pels/fru_identity.cpp
index ca523c4..15a7bda 100644
--- a/extensions/openpower-pels/fru_identity.cpp
+++ b/extensions/openpower-pels/fru_identity.cpp
@@ -17,12 +17,10 @@
#include "pel_values.hpp"
-#include <phosphor-logging/log.hpp>
+#include <phosphor-logging/lg2.hpp>
#include <format>
-using namespace phosphor::logging;
-
namespace openpower
{
namespace pels
@@ -255,9 +253,8 @@
}
else
{
- log<level::ERR>(
- std::format("Invalid maintenance procedure {}", procedure)
- .c_str());
+ lg2::error("Invalid maintenance procedure {PROCEDURE}", "PROCEDURE",
+ procedure);
strncpy(_pnOrProcedureID.data(), "INVALID",
_pnOrProcedureID.size());
}
@@ -287,8 +284,7 @@
}
else
{
- log<level::ERR>("Invalid symbolic FRU",
- entry("FRU=%s", symbolicFRU.c_str()));
+ lg2::error("Invalid symbolic FRU {FRU}", "FRU", symbolicFRU);
strncpy(_pnOrProcedureID.data(), "INVALID",
_pnOrProcedureID.size());
}