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/user_data.cpp b/extensions/openpower-pels/user_data.cpp
index 0b07b8b..a24a8f3 100644
--- a/extensions/openpower-pels/user_data.cpp
+++ b/extensions/openpower-pels/user_data.cpp
@@ -22,10 +22,10 @@
#include "user_data_json.hpp"
#endif
-#include <fmt/format.h>
-
#include <phosphor-logging/log.hpp>
+#include <format>
+
namespace openpower
{
namespace pels
@@ -64,7 +64,7 @@
catch (const std::exception& e)
{
log<level::ERR>(
- fmt::format("Cannot unflatten user data: {}", e.what()).c_str());
+ std::format("Cannot unflatten user data: {}", e.what()).c_str());
_valid = false;
}
}
@@ -88,7 +88,7 @@
if (header().id != static_cast<uint16_t>(SectionID::userData))
{
log<level::ERR>(
- fmt::format("Invalid UserData section ID: {0:#x}", header().id)
+ std::format("Invalid UserData section ID: {0:#x}", header().id)
.c_str());
_valid = false;
}