Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

Function template register_formatter_factory

boost::log::register_formatter_factory — The function registers a user-defined formatter factory.

Synopsis

// In header: <boost/log/utility/setup/formatter_parser.hpp>


template<typename FactoryT> 
  enable_if< is_base_and_derived< formatter_factory< typename FactoryT::char_type >, FactoryT >>::type 
  register_formatter_factory(attribute_name const & attr_name, 
                             shared_ptr< FactoryT > const & factory);

Description

The function registers a user-defined formatter factory. The registered factory function will be called when the formatter parser detects the specified attribute name in the formatter string.

Parameters:

attr_name

Attribute name

factory

Pointer to the formatter factory

Requires:

!!attr_name && !!factory.


PrevUpHomeNext