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/user_data.cpp b/extensions/openpower-pels/user_data.cpp
index a24a8f3..cb4acd1 100644
--- a/extensions/openpower-pels/user_data.cpp
+++ b/extensions/openpower-pels/user_data.cpp
@@ -22,7 +22,7 @@
 #include "user_data_json.hpp"
 #endif
 
-#include <phosphor-logging/log.hpp>
+#include <phosphor-logging/lg2.hpp>
 
 #include <format>
 
@@ -31,8 +31,6 @@
 namespace pels
 {
 
-using namespace phosphor::logging;
-
 void UserData::unflatten(Stream& stream)
 {
     stream >> _header;
@@ -63,8 +61,7 @@
     }
     catch (const std::exception& e)
     {
-        log<level::ERR>(
-            std::format("Cannot unflatten user data: {}", e.what()).c_str());
+        lg2::error("Cannot unflatten user data: {EXCEPTION}", "EXCEPTION", e);
         _valid = false;
     }
 }
@@ -87,9 +84,8 @@
 {
     if (header().id != static_cast<uint16_t>(SectionID::userData))
     {
-        log<level::ERR>(
-            std::format("Invalid UserData section ID: {0:#x}", header().id)
-                .c_str());
+        lg2::error("Invalid UserData section ID: {HEADER_ID}", "HEADER_ID",
+                   lg2::hex, header().id);
         _valid = false;
     }
     else