Add log invoke and logger

Summary: related to T15252, #24

Reviewers: ivica

Reviewed By: ivica

Subscribers: iljazovic, miljen

Maniphest Tasks: T15252

Differential Revision: https://repo.mireo.local/D32382
This commit is contained in:
Korina Šimičević
2024-11-27 13:45:23 +01:00
parent 9240c51b28
commit f22a3c7bec
18 changed files with 693 additions and 54 deletions
+6 -2
View File
@@ -14,6 +14,8 @@
#include <boost/asio/post.hpp>
#include <boost/asio/prepend.hpp>
#include <async_mqtt5/detail/log_invoke.hpp>
#include <async_mqtt5/impl/client_service.hpp>
#include <async_mqtt5/impl/reconnect_op.hpp>
@@ -111,7 +113,8 @@ void run_connect_to_localhost_test(int succeed_after) {
);
auto stream_ctx = stream_context(std::monostate {});
auto auto_stream = astream(ioc.get_executor(), stream_ctx);
auto log = detail::log_invoke();
auto auto_stream = astream(ioc.get_executor(), stream_ctx, log);
auto_stream.brokers("localhost", 1883);
auto handler = [&handlers_called](error_code ec) {
@@ -144,7 +147,8 @@ BOOST_AUTO_TEST_CASE(no_servers) {
asio::io_context ioc;
auto stream_ctx = stream_context(std::monostate{});
auto auto_stream = astream(ioc.get_executor(), stream_ctx);
auto log = detail::log_invoke();
auto auto_stream = astream(ioc.get_executor(), stream_ctx, log);
auto_stream.brokers("", 1883);
auto handler = [&handlers_called](error_code ec) {