boost::log::sinks::basic_direct_mapping — Straightforward mapping.
// In header: <boost/log/sinks/attribute_mapping.hpp> template<typename CharT, typename MappedT, typename AttributeValueT = int> class basic_direct_mapping : public boost::log::sinks::basic_mapping< CharT, MappedT > { public: // types typedef AttributeValueT attribute_value_type; // Attribute contained value type. typedef base_type::char_type char_type; // Char type. typedef base_type::string_type string_type; // String type. typedef base_type::values_view_type values_view_type; // Attribute values view type. typedef base_type::mapped_type mapped_type; // Mapped value type. // construct/copy/destruct explicit basic_direct_mapping(string_type const &, mapped_type const &); // public member functions mapped_type operator()(values_view_type const &) const; };