## Class template basic_channel_logger

boost::log::sources::basic_channel_logger — Channel feature implementation.

## Synopsis

    // 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::threading_model                   threading_model;    // Threading model being used.
      typedef ChannelT                                     channel_type;       // Channel type.
      typedef attributes::mutable_constant< channel_type > channel_attribute;  // Channel attribute type.
      typedef unspecified                                  open_record_lock;   // Lock requirement for the open_record_unlocked method.
      typedef unspecified                                  swap_lock;          // Lock requirement for the swap_unlocked method.

      // member classes/structs/unions

      // Default channel name generator.

      struct make_default_channel_name {
        // types
        typedef channel_type result_type;

        // public member functions
        result_type operator()() const;
      };

      // construct/copy/destruct
      basic_channel_logger();
      basic_channel_logger(basic_channel_logger const &);
      basic_channel_logger(basic_channel_logger &&);
      template<typename ArgsT> explicit basic_channel_logger(ArgsT const &);

      // public member functions
      channel_type channel() const;
      void channel(channel_type const &);

      // protected member functions
      channel_attribute const & get_channel_attribute() const;
      template<typename ArgsT> record open_record_unlocked(ArgsT const &);
      void swap_unlocked(basic_channel_logger &);

      // private member functions
      template<typename ArgsT, typename T>
        record open_record_with_channel_unlocked(ArgsT const &, T const &);
      template<typename ArgsT>
        record open_record_with_channel_unlocked(ArgsT const &, parameter::void_);
    };

## Description

### `basic_channel_logger` public construct/copy/destruct

1.     basic_channel_logger();

   Default constructor. The constructed logger has the default-constructed channel name.

2.     basic_channel_logger(basic_channel_logger const & that);

   Copy constructor

3.     basic_channel_logger(basic_channel_logger && that);

   Move constructor

4.     template<typename ArgsT> explicit basic_channel_logger(ArgsT const & args);

   Constructor with arguments. Allows to register a channel name attribute on construction.

   Parameters:

   `args`

   A set of named arguments. The following arguments are supported:

   - `channel` - a string that represents the channel name

### `basic_channel_logger` public member functions

1.     channel_type channel() const;

   The observer of the channel name

   Returns: | The channel name that was set by the logger

2.     void channel(channel_type const & ch);

   The setter of the channel name

   Parameters:

   `ch` | The channel name to be set for the logger

### `basic_channel_logger` protected member functions

1.     channel_attribute const & get_channel_attribute() const;

   Channel attribute accessor

2.     template<typename ArgsT> record open_record_unlocked(ArgsT const & args);

   Unlocked `open_record`

3.     void swap_unlocked(basic_channel_logger & that);

   Unlocked swap

### `basic_channel_logger` private member functions

1.     template<typename ArgsT, typename T>
         record open_record_with_channel_unlocked(ArgsT const & args, T const & ch);

   The `open_record` implementation for the case when the channel is specified in log statement.

2.     template<typename ArgsT>
         record open_record_with_channel_unlocked(ArgsT const & args,
                                                  parameter::void_);

   The `open_record` implementation for the case when the channel is not specified in log statement.