Boost C++ Libraries

PrevUpHomeNext

Class template basic_text_multifile_backend

boost::log::sinks::basic_text_multifile_backend — An implementation of a text multiple files logging sink backend.

Synopsis

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

template<typename CharT> 
class basic_text_multifile_backend :
  public basic_formatting_sink_backend< CharT >
{
public:
  // types
  typedef base_type::char_type                        char_type;                // Character type. 
  typedef base_type::string_type                      string_type;              // String type to be used as a message text holder. 
  typedef base_type::target_string_type               target_string_type;       // String type to be used as a message text holder. 
  typedef base_type::record_type                      record_type;              // Log record type. 
  typedef unspecified                                 path_type;                // Path type that is used by Boost.Log. 
  typedef function1< path_type, record_type const & > file_name_composer_type;  // File name composer functor type. 

  // construct/copy/destruct
  basic_text_multifile_backend();
  ~basic_text_multifile_backend();

  // public member functions
  template<typename ComposerT> void set_file_name_composer(ComposerT const &);
};

Description

The sink backend puts formatted log records to one of the text files. The particular file is chosen upon each record's attribute values, which allows to distribute records into individual files or to group records related to some entity or process in a separate file.

basic_text_multifile_backend public construct/copy/destruct

  1. basic_text_multifile_backend();

    Default constructor. The constructed sink backend has no file name composer and thus will not write any files.

  2. ~basic_text_multifile_backend();

    Destructor

basic_text_multifile_backend public member functions

  1. template<typename ComposerT> 
      void set_file_name_composer(ComposerT const & composer);

    The method sets file name composer functional object. Log record formatters are accepted, too.

    Parameters:
    composer

    File name composer functor


PrevUpHomeNext