Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::sinks::text_multifile_backend Class Reference

An implementation of a text multiple files logging sink backend. More...

#include <text_multifile_backend.hpp>

Inheritance diagram for boost::sinks::text_multifile_backend:
Collaboration diagram for boost::sinks::text_multifile_backend:

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...
 

Detailed Description

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.

Member Typedef Documentation

File name composer functor type.

Frontend requirements.

String type to be used as a message text holder.

Constructor & Destructor Documentation

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.

Member Function Documentation

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.

template<typename ComposerT >
void boost::sinks::text_multifile_backend::set_file_name_composer ( ComposerT const &  composer)
inline

The method sets file name composer functional object.

Log record formatters are accepted, too.

Parameters
composerFile name composer functor

The documentation for this class was generated from the following file: