boost::log::sources::basic_channel_logger — Channel feature implementation.
// In header: <boost/log/sources/channel_feature.hpp> template<typename BaseT, typename ChannelT> class basic_channel_logger { public: // types typedef base_type::char_type char_type; // Character type. typedef base_type::final_type final_type; // Final type. typedef base_type::attribute_set_type attribute_set_type; // Attribute set type. typedef base_type::string_type string_type; // String type. typedef base_type::threading_model threading_model; // Threading model being used. typedef ChannelT channel_type; // Channel type. typedef attributes::constant< channel_type > channel_attribute; // Channel attribute type. typedef strictest_lock< typename base_type::swap_lock, lock_guard< threading_model > >::type swap_lock; // Lock requirement for the swap_unlocked method. // construct/copy/destruct basic_channel_logger(); basic_channel_logger(basic_channel_logger const &); template<typename ArgsT> explicit basic_channel_logger(ArgsT const &); // public member functions bool has_channel() const; channel_type const & channel() const; // protected member functions shared_ptr< channel_attribute > const & get_channel_attribute() const; void swap_unlocked(basic_channel_logger &); };
basic_channel_logger
public
construct/copy/destructbasic_channel_logger();
Default constructor. The constructed logger does not have the channel attribute.
basic_channel_logger(basic_channel_logger const & that);
Copy constructor
template<typename ArgsT> explicit basic_channel_logger(ArgsT const & args);
Constructor with arguments. Allows to register a channel name attribute on construction.
Parameters: |
|
basic_channel_logger
public member functionsbool has_channel() const;
The observer of the channel attribute presence
Returns: |
|
channel_type const & channel() const;
The observer of the channel name
Requires: |
|
Returns: | The channel name that was set by the logger |
basic_channel_logger
protected member functionsshared_ptr< channel_attribute > const & get_channel_attribute() const;
Channel attribute accessor
void swap_unlocked(basic_channel_logger & that);
Unlocked swap