use std::format instead of fmt::format
The std::format is sufficient for the uses in this repository except
for in one file (override_fan_target.cpp, since P2286 isn't supported
by GCC yet). Switch to std::format whenever possible.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ib2576fb530a4d7ce238e1b0bd95b40b476ec2107
diff --git a/presence/tach.cpp b/presence/tach.cpp
index 9fa8256..9f6e105 100644
--- a/presence/tach.cpp
+++ b/presence/tach.cpp
@@ -18,10 +18,9 @@
#include "logging.hpp"
#include "rpolicy.hpp"
-#include <fmt/format.h>
-
#include <phosphor-logging/log.hpp>
+#include <format>
#include <string>
#include <tuple>
#include <vector>
@@ -75,7 +74,7 @@
std::get<double>(s) = 0;
log<level::INFO>(
- fmt::format("Unable to read fan tach sensor {}", tachPath)
+ std::format("Unable to read fan tach sensor {}", tachPath)
.c_str());
}
}
@@ -144,7 +143,7 @@
void Tach::logConflict(const std::string& fanInventoryPath) const
{
- getLogger().log(fmt::format(
+ getLogger().log(std::format(
"Tach sensor presence detect for fan {} said not present but "
"other methods indicated present",
fanInventoryPath));