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/targets.hpp b/targets.hpp
index 515bf2e..5cd82ff 100644
--- a/targets.hpp
+++ b/targets.hpp
@@ -5,13 +5,12 @@
#include "fan_speed.hpp"
#include "hwmonio.hpp"
-#include <fmt/format.h>
-
#include <phosphor-logging/elog-errors.hpp>
#include <phosphor-logging/log.hpp>
#include <xyz/openbmc_project/Sensor/Device/error.hpp>
#include <filesystem>
+#include <format>
#include <memory>
enum class targetType
@@ -155,7 +154,7 @@
metadata::CALLOUT_ERRNO(e.code().value()),
metadata::CALLOUT_DEVICE_PATH(devPath.c_str()));
- log<level::INFO>(fmt::format("Failing sysfs file: {} errno: {}",
+ log<level::INFO>(std::format("Failing sysfs file: {} errno: {}",
sysfsFullPath, e.code().value())
.c_str());
}