An implementation of a text output stream logging sink backend. More...
#include <text_ostream_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 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... | |
An implementation of a text output stream logging sink backend.
The sink backend puts formatted log records to one or more text streams.
| typedef base_type::char_type boost::sinks::basic_text_ostream_backend< CharT >::char_type |
Character type.
|
inherited |
Frontend requirements.
| typedef std::basic_ostream< char_type > boost::sinks::basic_text_ostream_backend< CharT >::stream_type |
Output stream type.
| typedef base_type::string_type boost::sinks::basic_text_ostream_backend< CharT >::string_type |
String type to be used as a message text holder.
| 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.
| BOOST_LOG_API boost::sinks::basic_text_ostream_backend< CharT >::~basic_text_ostream_backend | ( | ) |
Destructor.
| 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.
| strm | Pointer to the stream. Must not be NULL. |
| 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.
| 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.
| BOOST_LOG_API void boost::sinks::basic_text_ostream_backend< CharT >::flush | ( | ) |
The method flushes the associated streams.
| 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.
| strm | Pointer to the stream. Must not be NULL. |