Boost C++ Libraries

PrevUpHomeNext

Class template file_name_composer_adapter

boost::log::sinks::file::file_name_composer_adapter

Synopsis

// In header: <boost/log/sinks/text_multifile_backend.hpp>

template<typename FormatterT> 
class file_name_composer_adapter {
public:
  // types
  typedef unspecified                     result_type;     // Functor result type. 
  typedef FormatterT                      formatter_type;  // The adopted formatter type. 
  typedef formatter_type::char_type       char_type;       // Character type used by the formatter. 
  typedef formatter_type::string_type     string_type;     // String type used by the formatter. 
  typedef formatter_type::record_type     record_type;     // Log record type. 
  typedef unspecified                     streambuf_type;  // Stream buffer type used to store formatted data. 
  typedef std::basic_ostream< char_type > stream_type;     // Stream type used for formatting. 

  // construct/copy/destruct
  explicit file_name_composer_adapter(formatter_type const &, 
                                      std::locale const & = std::locale());
  file_name_composer_adapter(file_name_composer_adapter const &);
  file_name_composer_adapter& operator=(file_name_composer_adapter const &);

  // public member functions
  result_type operator()(record_type const &) const;
};

Description

An adapter class that allows to use regular formatters as file name generators.

file_name_composer_adapter public construct/copy/destruct

  1. explicit file_name_composer_adapter(formatter_type const & formatter, 
                                        std::locale const & loc = std::locale());

    Initializing constructor

  2. file_name_composer_adapter(file_name_composer_adapter const & that);

    Copy constructor

  3. file_name_composer_adapter& operator=(file_name_composer_adapter const & that);

    Assignment

file_name_composer_adapter public member functions

  1. result_type operator()(record_type const & record) const;

    The operator generates a file name based on the log record


PrevUpHomeNext