switch from std fmt to fmt lib

This commit is contained in:
Bartosz Wieczorek 2025-11-17 17:58:10 +01:00
parent f141c56e83
commit 14246d2c62
4 changed files with 4 additions and 4 deletions

View File

@ -28,7 +28,7 @@ set(BOOST_ROOT /usr/local/boost-1.89)
find_package(Boost 1.89 REQUIRED COMPONENTS json mqtt5)
# spdlog
set(SPDLOG_USE_STD_FORMAT ON)
set(SPDLOG_USE_STD_FORMAT OFF)
FetchContent_Declare(
spdlog
GIT_REPOSITORY https://github.com/gabime/spdlog

View File

@ -67,7 +67,7 @@ awaitable_expected< void > ranczo::ModbusTcpContext::wait_between_commands() {
// Jeśli timer ma expiry w przyszłości czekamy
if(expiry > now) {
boost::system::error_code ec;
spdlog::trace("Timer waits {%f.02}us to expire time between ",
spdlog::trace("Timer waits {:.2f}us to expire time between ",
std::chrono::duration_cast< std::chrono::duration< double, std::micro > >(expiry - now).count());
co_await delay_timer_.async_wait(asio::redirect_error(asio::use_awaitable, ec));

View File

@ -152,7 +152,7 @@ struct AsyncMqttClient::AsyncMqttClientImpl {
if(ec) {
spdlog::error("MQTT subscribe error: {}", ec.message());
for(int i{}; i < sub_codes.size(); i++)
spdlog::error("MQTT subscribe suberror[{}]: {}", sub_codes[i].message());
spdlog::error("MQTT subscribe suberror[{}]: {}", i, sub_codes[i].message());
co_return std::unexpected{ec};
}

View File

@ -697,7 +697,7 @@ struct RelayThermostat::Impl : private boost::noncopyable {
}
awaitable_expected< void > handle_command(const commands::SlopeWindowChange & cmd) {
spdlog::info("Heater slope window update {}ns for {}/{}", cmd.window, _room, _zone);
spdlog::info("Heater slope window update {}ns for {}/{}", cmd.window.count(), _room, _zone);
_slopeWindow = cmd.window;
co_return _void{};
}