boost::log::formatters::fmt_named_scope — Named scope attribute formatter.
// In header: <boost/log/formatters/named_scope.hpp> template<typename CharT, typename ExceptionPolicyT> class fmt_named_scope : public basic_formatter< CharT, fmt_named_scope< CharT, 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. typedef attributes::basic_named_scope< char_type >::scope_stack scope_stack; // Scope stack container type. // construct/copy/destruct template<typename T1, typename T2> fmt_named_scope(T1 const &, T2 const &, typename scope_stack::size_type, scope_iteration_direction); // public member functions void operator()(ostream_type &, record_type const &) const; // private member functions void format(ostream_type &, scope_stack const &) const; };
The formatter iterates through the list of scopes and puts each one into the resulting stream. The formatter supports customizing the iteration direction, depth and delimiter between the scopes.
fmt_named_scope
public
construct/copy/destructtemplate<typename T1, typename T2> fmt_named_scope(T1 const & name, T2 const & delimiter, typename scope_stack::size_type max_scopes, scope_iteration_direction direction);
Constructor
Parameters: |
|
fmt_named_scope
public member functionsvoid operator()(ostream_type & strm, record_type const & record) const;
Formatting operator. Acquires the scope list attribute value with the name specified on the formatter construction from record and puts its contents into the strm stream.
Parameters: |
|