PEL: switch fmt::format to use std::format
fmt::format is supported in the c++ std. This will
help to remove fmt package dependency.
Change-Id: I89f0a5b67bbfe54168a20e93c989a1ae87f54503
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
diff --git a/extensions/openpower-pels/failing_mtms.cpp b/extensions/openpower-pels/failing_mtms.cpp
index a8b33d3..7355e08 100644
--- a/extensions/openpower-pels/failing_mtms.cpp
+++ b/extensions/openpower-pels/failing_mtms.cpp
@@ -19,10 +19,10 @@
#include "pel_types.hpp"
#include "pel_values.hpp"
-#include <fmt/format.h>
-
#include <phosphor-logging/log.hpp>
+#include <format>
+
namespace openpower
{
namespace pels
@@ -54,7 +54,7 @@
catch (const std::exception& e)
{
log<level::ERR>(
- fmt::format("Cannot unflatten failing MTM section: {}", e.what())
+ std::format("Cannot unflatten failing MTM section: {}", e.what())
.c_str());
_valid = false;
}
@@ -67,14 +67,14 @@
if (header().id != static_cast<uint16_t>(SectionID::failingMTMS))
{
log<level::ERR>(
- fmt::format("Invalid failing MTMS section ID: {0:#x}", header().id)
+ std::format("Invalid failing MTMS section ID: {0:#x}", header().id)
.c_str());
failed = true;
}
if (header().version != failingMTMSVersion)
{
- log<level::ERR>(fmt::format("Invalid failing MTMS version: {0:#x}",
+ log<level::ERR>(std::format("Invalid failing MTMS version: {0:#x}",
header().version)
.c_str());
failed = true;