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/log_id.cpp b/extensions/openpower-pels/log_id.cpp
index ea00ef3..5fda994 100644
--- a/extensions/openpower-pels/log_id.cpp
+++ b/extensions/openpower-pels/log_id.cpp
@@ -17,7 +17,7 @@
#include "paths.hpp"
-#include <phosphor-logging/log.hpp>
+#include <phosphor-logging/lg2.hpp>
#include <chrono>
#include <filesystem>
@@ -29,7 +29,6 @@
{
namespace fs = std::filesystem;
-using namespace phosphor::logging;
constexpr uint32_t startingLogID = 1;
constexpr uint32_t bmcLogIDPrefix = 0x50000000;
@@ -87,7 +86,7 @@
if (idFile.fail())
{
// Just make up an ID
- log<level::ERR>("Unable to read PEL ID File!");
+ lg2::error("Unable to read PEL ID File!");
return detail::getTimeBasedLogID();
}
}
@@ -103,7 +102,7 @@
if (idFile.fail())
{
// Just make up an ID so we don't reuse one next time
- log<level::ERR>("Unable to write PEL ID File!");
+ lg2::error("Unable to write PEL ID File!");
return detail::getTimeBasedLogID();
}
@@ -123,8 +122,7 @@
if (rf.eof())
{
fs::remove(filename);
- log<level::WARNING>(
- "PEL ID file seems corrupted. Deleting it.");
+ lg2::warning("PEL ID file seems corrupted. Deleting it.");
break;
}
rf.read(&ch, sizeof(ch));