async_mqtt supports Boost.Log style logging. The severity levels are fatal, error, warning, info, debug, and trace.

The easiest way to setup logging is

async_mqtt::setup_log(async_mqtt::severity_level::info); // you can use any other severity_level

You can setup your custom settings.

See include/async_mqtt/setup_log.hpp