boost::log::formatters::fmt_attr — Generic attribute value formatter.
// In header: <boost/log/formatters/attr.hpp> template<typename CharT, typename AttributeValueTypesT, typename ExceptionPolicyT> class fmt_attr : public basic_formatter< CharT, fmt_attr< CharT, AttributeValueTypesT, ExceptionPolicyT > > { public: // types typedef base_type::char_type char_type; // Character type. typedef base_type::string_type string_type; // String type. typedef base_type::ostream_type ostream_type; // Stream type. typedef base_type::record_type record_type; // Log record type. // construct/copy/destruct explicit fmt_attr(string_type const &); // public member functions void operator()(ostream_type &, record_type const &) const; };
The fmt_attr
formatter attempts to convert the attribute value to a string by putting it into a stream. The final representation of the value is totally defined by the operator<<
overload implementation.
The formatter can either accept a single attribute value type or a sequence of types.
fmt_attr
public member functionsvoid operator()(ostream_type & strm, record_type const & record) const;
Formatting operator. Puts the attribute with the specified on construction name from attrs into the strm stream.
Parameters: |
|