boost::log::formatters::fmt_if_else — Conditional 'if-else' formatter.
// In header: <boost/log/formatters/if.hpp> template<typename FilterT, typename ThenT, typename ElseT> class fmt_if_else : public basic_formatter< ThenT::char_type, fmt_if_else< FilterT, ThenT, ElseT > > { public: // types 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 fmt_if_else(FilterT const &, ThenT const &, ElseT const &); // public member functions void operator()(ostream_type &, record_type const &) const; };
fmt_if_else
public member functionsvoid operator()(ostream_type & strm, record_type const & record) const;
Formatting operator. Applies the filter to the log record. If the filter returns true
passes the received arguments to the aggregated then-formatter. Otherwise calls else-formatter.
Parameters: |
|