prefer std::format over fmt
Since C++20, std::format has existed so prefer that. For the single
fmt::print call we can use stdplus::print until GCC supports the std
one.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I4c8af58966fb7330dee20fb13ae2ef11d8a823c7
diff --git a/mainloop.cpp b/mainloop.cpp
index cfc5b5e..6fa74d3 100644
--- a/mainloop.cpp
+++ b/mainloop.cpp
@@ -29,13 +29,12 @@
#include "thresholds.hpp"
#include "util.hpp"
-#include <fmt/format.h>
-
#include <phosphor-logging/elog-errors.hpp>
#include <xyz/openbmc_project/Sensor/Device/error.hpp>
#include <cassert>
#include <cstdlib>
+#include <format>
#include <functional>
#include <future>
#include <iostream>
@@ -302,7 +301,7 @@
xyz::openbmc_project::Sensor::Device::ReadFailure::
CALLOUT_DEVICE_PATH(_devPath.c_str()));
- log<level::INFO>(fmt::format("Failing sysfs file: {} errno: {}", file,
+ log<level::INFO>(std::format("Failing sysfs file: {} errno: {}", file,
e.code().value())
.c_str());
exit(EXIT_FAILURE);
@@ -618,7 +617,7 @@
xyz::openbmc_project::Sensor::Device::ReadFailure::
CALLOUT_DEVICE_PATH(_devPath.c_str()));
- log<level::INFO>(fmt::format("Failing sysfs file: {} errno: {}",
+ log<level::INFO>(std::format("Failing sysfs file: {} errno: {}",
file, e.code().value())
.c_str());