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/service_indicators.cpp b/extensions/openpower-pels/service_indicators.cpp
index 9572f25..8826276 100644
--- a/extensions/openpower-pels/service_indicators.cpp
+++ b/extensions/openpower-pels/service_indicators.cpp
@@ -15,11 +15,10 @@
*/
#include "service_indicators.hpp"
-#include <fmt/format.h>
-
#include <phosphor-logging/log.hpp>
#include <bitset>
+#include <format>
namespace openpower::pels::service_indicators
{
@@ -96,7 +95,7 @@
catch (const std::exception& e)
{
log<level::ERR>(
- fmt::format("Failed to assert platform SAI LED group: {}",
+ std::format("Failed to assert platform SAI LED group: {}",
e.what())
.c_str());
}
@@ -215,7 +214,7 @@
}
catch (const std::exception& e)
{
- log<level::ERR>(fmt::format("Could not get inventory path for "
+ log<level::ERR>(std::format("Could not get inventory path for "
"location code {} ({}).",
locCode, e.what())
.c_str());
@@ -242,7 +241,7 @@
catch (const std::exception& e)
{
log<level::INFO>(
- fmt::format("Could not write Functional property on {} ({})",
+ std::format("Could not write Functional property on {} ({})",
path, e.what())
.c_str());
}
@@ -261,7 +260,7 @@
catch (const std::exception& e)
{
log<level::INFO>(
- fmt::format(
+ std::format(
"Could not set critical association on object path {} ({})",
path, e.what())
.c_str());