An implementation of a text multiple files logging sink backend. More...
#include <text_multifile_backend.hpp>
Public Types | |
typedef base_type::char_type | char_type |
Character type. More... | |
typedef base_type::string_type | string_type |
String type to be used as a message text holder. More... | |
typedef boost::log::aux::light_function < filesystem::path(record_view const &) > | file_name_composer_type |
File name composer functor type. More... | |
typedef base_type::frontend_requirements | frontend_requirements |
Frontend requirements. More... | |
Public Member Functions | |
BOOST_LOG_API | text_multifile_backend () |
Default constructor. More... | |
BOOST_LOG_API | ~text_multifile_backend () |
Destructor. More... | |
template<typename ComposerT > | |
void | set_file_name_composer (ComposerT const &composer) |
The method sets file name composer functional object. More... | |
BOOST_LOG_API void | consume (record_view const &rec, string_type const &formatted_message) |
The method writes the message to the sink. More... | |
An implementation of a text multiple files logging sink backend.
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.
Character type.
typedef boost::log::aux::light_function< filesystem::path (record_view const&) > boost::sinks::text_multifile_backend::file_name_composer_type |
File name composer functor type.
|
inherited |
Frontend requirements.
String type to be used as a message text holder.
BOOST_LOG_API boost::sinks::text_multifile_backend::text_multifile_backend | ( | ) |
Default constructor.
The constructed sink backend has no file name composer and thus will not write any files.
BOOST_LOG_API boost::sinks::text_multifile_backend::~text_multifile_backend | ( | ) |
Destructor.
BOOST_LOG_API void boost::sinks::text_multifile_backend::consume | ( | record_view const & | rec, |
string_type const & | formatted_message | ||
) |
The method writes the message to the sink.
|
inline |
The method sets file name composer functional object.
Log record formatters are accepted, too.
composer | File name composer functor |