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

An implementation of a text output stream logging sink backend. More...

#include <text_ostream_backend.hpp>

Inheritance diagram for boost::sinks::basic_text_ostream_backend< CharT >:
Collaboration diagram for boost::sinks::basic_text_ostream_backend< CharT >:

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 std::basic_ostream
< char_type
stream_type
 Output stream type. More...
 
typedef
base_type::frontend_requirements 
frontend_requirements
 Frontend requirements. More...
 

Public Member Functions

BOOST_LOG_API basic_text_ostream_backend ()
 Constructor. More...
 
BOOST_LOG_API ~basic_text_ostream_backend ()
 Destructor. More...
 
BOOST_LOG_API void add_stream (shared_ptr< stream_type > const &strm)
 The method adds a new stream to the sink. More...
 
BOOST_LOG_API void remove_stream (shared_ptr< stream_type > const &strm)
 The method removes a stream from the sink. More...
 
BOOST_LOG_API void auto_flush (bool f=true)
 Sets the flag to automatically flush buffers of all attached streams after each log record. More...
 
BOOST_LOG_API void consume (record_view const &rec, string_type const &formatted_message)
 The method writes the message to the sink. More...
 
BOOST_LOG_API void flush ()
 The method flushes the associated streams. More...
 

Detailed Description

template<typename CharT>
class boost::sinks::basic_text_ostream_backend< CharT >

An implementation of a text output stream logging sink backend.

The sink backend puts formatted log records to one or more text streams.

Member Typedef Documentation

template<typename CharT >
typedef base_type::char_type boost::sinks::basic_text_ostream_backend< CharT >::char_type

Character type.

template<typename CharT >
typedef std::basic_ostream< char_type > boost::sinks::basic_text_ostream_backend< CharT >::stream_type

Output stream type.

String type to be used as a message text holder.

Constructor & Destructor Documentation

template<typename CharT >
BOOST_LOG_API boost::sinks::basic_text_ostream_backend< CharT >::basic_text_ostream_backend ( )

Constructor.

No streams attached to the constructed backend, auto flush feature disabled.

template<typename CharT >
BOOST_LOG_API boost::sinks::basic_text_ostream_backend< CharT >::~basic_text_ostream_backend ( )

Destructor.

Member Function Documentation

template<typename CharT >
BOOST_LOG_API void boost::sinks::basic_text_ostream_backend< CharT >::add_stream ( shared_ptr< stream_type > const &  strm)

The method adds a new stream to the sink.

Parameters
strmPointer to the stream. Must not be NULL.
template<typename CharT >
BOOST_LOG_API void boost::sinks::basic_text_ostream_backend< CharT >::auto_flush ( bool  f = true)

Sets the flag to automatically flush buffers of all attached streams after each log record.

template<typename CharT >
BOOST_LOG_API void boost::sinks::basic_text_ostream_backend< CharT >::consume ( record_view const &  rec,
string_type const &  formatted_message 
)

The method writes the message to the sink.

template<typename CharT >
BOOST_LOG_API void boost::sinks::basic_text_ostream_backend< CharT >::flush ( )

The method flushes the associated streams.

template<typename CharT >
BOOST_LOG_API void boost::sinks::basic_text_ostream_backend< CharT >::remove_stream ( shared_ptr< stream_type > const &  strm)

The method removes a stream from the sink.

If the stream is not attached to the sink, the method has no effect.

Parameters
strmPointer to the stream. Must not be NULL.

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