提交 c31440ba authored 作者: blu's avatar blu

mqtt api: future style

上级 1dd588df
......@@ -414,6 +414,7 @@ inline void spdlog::logger::default_err_handler_(const std::string &msg)
char date_buf[100];
std::strftime(date_buf, sizeof(date_buf), "%Y-%m-%d %H:%M:%S", &tm_time);
fmt::print(stderr, "[*** LOG ERROR ***] [{}] [{}] {}\n", date_buf, name(), msg);
//throw std::runtime_error("aaa");
}
inline void spdlog::logger::incr_msg_counter_(details::log_msg &msg)
......
......@@ -364,7 +364,7 @@ void on_conn_fail(void* context, MQTTAsync_failureData* response)
void on_sent(void* context, MQTTAsync_successData* response)
{
MqttHelper *self = (MqttHelper *) context;
spdlog::debug("Message delivery confirmed to {}", response->alt.pub.destinationName);
spdlog::debug("Message delivery confirmed, tok: {}", response->token);
}
void on_connected(void* context, MQTTAsync_successData* response)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论