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/journal.cpp b/extensions/openpower-pels/journal.cpp
index 70a4552..5a4238f 100644
--- a/extensions/openpower-pels/journal.cpp
+++ b/extensions/openpower-pels/journal.cpp
@@ -17,7 +17,7 @@
#include "util.hpp"
-#include <phosphor-logging/log.hpp>
+#include <phosphor-logging/lg2.hpp>
#include <format>
@@ -63,8 +63,8 @@
if (duration.count() > 100)
{
- log<level::INFO>(
- std::format("Journal sync took {}ms", duration.count()).c_str());
+ lg2::info("Journal sync took {DURATION}ms", "DURATION",
+ duration.count());
}
}
@@ -74,7 +74,7 @@
// The message registry JSON schema will also fail if a zero is in the JSON
if (0 == maxMessages)
{
- log<level::ERR>(
+ lg2::error(
"maxMessages value of zero passed into Journal::getMessages");
return std::vector<std::string>{};
}