diff --git a/example/bench.cpp b/example/bench.cpp index 2647b73a2..e063220ba 100644 --- a/example/bench.cpp +++ b/example/bench.cpp @@ -10,6 +10,7 @@ #include #include +#include #include #include diff --git a/example/broker.cpp b/example/broker.cpp index 8047cd943..317d18c0b 100644 --- a/example/broker.cpp +++ b/example/broker.cpp @@ -10,6 +10,8 @@ #include #include +#include +#include #include namespace as = boost::asio; diff --git a/example/client_cli.cpp b/example/client_cli.cpp index 32d0835d1..970c1d73f 100644 --- a/example/client_cli.cpp +++ b/example/client_cli.cpp @@ -5,6 +5,8 @@ // http://www.boost.org/LICENSE_1_0.txt) #include +#include +#include #include #include diff --git a/include/mqtt/broker/retained_topic_map.hpp b/include/mqtt/broker/retained_topic_map.hpp index 980dec687..4472eed85 100644 --- a/include/mqtt/broker/retained_topic_map.hpp +++ b/include/mqtt/broker/retained_topic_map.hpp @@ -7,6 +7,8 @@ #if !defined(MQTT_BROKER_RETAINED_TOPIC_MAP_HPP) #define MQTT_BROKER_RETAINED_TOPIC_MAP_HPP +#include + #include #include #include diff --git a/include/mqtt/log.hpp b/include/mqtt/log.hpp index 97f79340f..fd460d59d 100644 --- a/include/mqtt/log.hpp +++ b/include/mqtt/log.hpp @@ -7,7 +7,11 @@ #if !defined(MQTT_LOG_HPP) #define MQTT_LOG_HPP -#include +#include +#include +#include + +#if defined(MQTT_USE_LOG) #include #include @@ -24,12 +28,12 @@ #include #include +#endif // defined(MQTT_USE_LOG) + #include namespace MQTT_NS { -namespace log = boost::log; - struct channel : std::string { using std::string::string; }; @@ -72,7 +76,7 @@ inline constexpr null_log const& operator<<(null_log const& o, T const&) { retur // template arguments are defined in MQTT_NS // filter and formatter can distinguish mqtt_cpp's channel and severity by their types -using global_logger_t = log::sources::severity_channel_logger; +using global_logger_t = boost::log::sources::severity_channel_logger; inline global_logger_t& logger() { thread_local global_logger_t l; return l; diff --git a/include/mqtt/setup_log.hpp b/include/mqtt/setup_log.hpp index c47e0a26e..2d3e8a038 100644 --- a/include/mqtt/setup_log.hpp +++ b/include/mqtt/setup_log.hpp @@ -16,11 +16,16 @@ #include #include + +#if defined(MQTT_USE_LOG) + #include #include #include +#endif // defined(MQTT_USE_LOG) + namespace MQTT_NS { #if defined(MQTT_USE_LOG)