switch from std fmt to fmt lib
This commit is contained in:
parent
f141c56e83
commit
14246d2c62
@ -28,7 +28,7 @@ set(BOOST_ROOT /usr/local/boost-1.89)
|
|||||||
|
|
||||||
find_package(Boost 1.89 REQUIRED COMPONENTS json mqtt5)
|
find_package(Boost 1.89 REQUIRED COMPONENTS json mqtt5)
|
||||||
# spdlog
|
# spdlog
|
||||||
set(SPDLOG_USE_STD_FORMAT ON)
|
set(SPDLOG_USE_STD_FORMAT OFF)
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
spdlog
|
spdlog
|
||||||
GIT_REPOSITORY https://github.com/gabime/spdlog
|
GIT_REPOSITORY https://github.com/gabime/spdlog
|
||||||
|
|||||||
@ -67,7 +67,7 @@ awaitable_expected< void > ranczo::ModbusTcpContext::wait_between_commands() {
|
|||||||
// Jeśli timer ma expiry w przyszłości – czekamy
|
// Jeśli timer ma expiry w przyszłości – czekamy
|
||||||
if(expiry > now) {
|
if(expiry > now) {
|
||||||
boost::system::error_code ec;
|
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());
|
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));
|
co_await delay_timer_.async_wait(asio::redirect_error(asio::use_awaitable, ec));
|
||||||
|
|||||||
@ -152,7 +152,7 @@ struct AsyncMqttClient::AsyncMqttClientImpl {
|
|||||||
if(ec) {
|
if(ec) {
|
||||||
spdlog::error("MQTT subscribe error: {}", ec.message());
|
spdlog::error("MQTT subscribe error: {}", ec.message());
|
||||||
for(int i{}; i < sub_codes.size(); i++)
|
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};
|
co_return std::unexpected{ec};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -697,7 +697,7 @@ struct RelayThermostat::Impl : private boost::noncopyable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
awaitable_expected< void > handle_command(const commands::SlopeWindowChange & cmd) {
|
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;
|
_slopeWindow = cmd.window;
|
||||||
co_return _void{};
|
co_return _void{};
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user