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/failing_mtms.cpp b/extensions/openpower-pels/failing_mtms.cpp
index 7355e08..a056ce4 100644
--- a/extensions/openpower-pels/failing_mtms.cpp
+++ b/extensions/openpower-pels/failing_mtms.cpp
@@ -19,7 +19,7 @@
 #include "pel_types.hpp"
 #include "pel_values.hpp"
 
-#include <phosphor-logging/log.hpp>
+#include <phosphor-logging/lg2.hpp>
 
 #include <format>
 
@@ -29,7 +29,7 @@
 {
 
 namespace pv = openpower::pels::pel_values;
-using namespace phosphor::logging;
+
 static constexpr uint8_t failingMTMSVersion = 0x01;
 
 FailingMTMS::FailingMTMS(const DataInterfaceBase& dataIface) :
@@ -53,9 +53,8 @@
     }
     catch (const std::exception& e)
     {
-        log<level::ERR>(
-            std::format("Cannot unflatten failing MTM section: {}", e.what())
-                .c_str());
+        lg2::error("Cannot unflatten failing MTM section: {EXCEPTION}",
+                   "EXCEPTION", e);
         _valid = false;
     }
 }
@@ -66,17 +65,15 @@
 
     if (header().id != static_cast<uint16_t>(SectionID::failingMTMS))
     {
-        log<level::ERR>(
-            std::format("Invalid failing MTMS section ID: {0:#x}", header().id)
-                .c_str());
+        lg2::error("Invalid failing MTMS section ID: {HEADER_ID}", "HEADER_ID",
+                   lg2::hex, header().id);
         failed = true;
     }
 
     if (header().version != failingMTMSVersion)
     {
-        log<level::ERR>(std::format("Invalid failing MTMS version: {0:#x}",
-                                    header().version)
-                            .c_str());
+        lg2::error("Invalid failing MTMS version: {HEADER_VERSION}",
+                   "HEADER_VERSION", lg2::hex, header().version);
         failed = true;
     }