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 the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Struct template channel

boost::log::sources::channel — Channel support feature.

Synopsis

// 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;
  };
};

Description

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.


PrevUpHomeNext