Boost
C++ Libraries
...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
This is an older version of Boost and was released in 2022. The current version is 1.89.0.
boost::log::sources::channel — Channel support feature.
// In header: <boost/log/sources/channel_feature.hpp> template<typename ChannelT = std::string> struct channel { // member classes/structs/unions template<typename BaseT> struct apply { // types typedef basic_channel_logger< BaseT, ChannelT > type; }; };
The logger with this feature automatically registers an attribute with the specified on construction value, which is a channel name. The channel name can be modified through the logger life time, either by calling the channel method or by specifying the name in the logging statement.
The type of the channel name can be customized by providing it as a template parameter to the feature template. By default, a string will be used.