boost::log::sources::channel — Channel support feature.
// In header: <boost/log/sources/channel_feature.hpp> template<typename ChannelT = void> struct channel { // member classes/structs/unions template<typename BaseT> struct apply { // types typedef basic_channel_logger< BaseT, typename mpl::if_< is_void< ChannelT >, typename BaseT::string_type, ChannelT >::type > type; }; };
The logger with this feature automatically registers constant attribute with the specified on construction value, which is a channel name. The channel name cannot be modified through the logger life time.
The type of the channel name can be customized by providing it as a template parameter to the feature template. By default, a string with the corresponding character type will be used.