Logging record adapter with a streaming capability. More...
#include <record_ostream.hpp>
Public Types | |
typedef CharT | char_type |
Character type. More... | |
typedef std::basic_string < char_type > | string_type |
String type to be used as a message text holder. More... | |
typedef std::basic_ostream < char_type > | stream_type |
Stream type. More... | |
typedef TraitsT | traits_type |
Character traits. More... | |
typedef AllocatorT | allocator_type |
Memory allocator. More... | |
typedef boost::log::aux::basic_ostringstreambuf < char_type, traits_type, allocator_type > | streambuf_type |
Stream buffer type. More... | |
typedef std::basic_ostream < char_type, traits_type > | ostream_type |
Stream type. More... | |
typedef ostream_type::pos_type | pos_type |
Stream position type. More... | |
typedef ostream_type::off_type | off_type |
Stream offset type. More... | |
typedef ostream_type::int_type | int_type |
Integer type for characters. More... | |
typedef ostream_type::failure | failure |
typedef ostream_type::fmtflags | fmtflags |
typedef ostream_type::iostate | iostate |
typedef ostream_type::openmode | openmode |
typedef ostream_type::seekdir | seekdir |
typedef ostream_type::Init | Init |
typedef ostream_type::event | event |
typedef ostream_type::event_callback | event_callback |
Public Member Functions | |
basic_record_ostream () BOOST_NOEXCEPT | |
Default constructor. More... | |
basic_record_ostream (record &rec) | |
Constructor from a record object. More... | |
~basic_record_ostream () BOOST_NOEXCEPT | |
Destructor. More... | |
bool | operator! () const BOOST_NOEXCEPT |
Conversion to an unspecified boolean type. More... | |
record & | get_record () |
Flushes internal buffers to complete all pending formatting operations and returns the aggregated log record. More... | |
record const & | get_record () const |
Flushes internal buffers to complete all pending formatting operations and returns the aggregated log record. More... | |
void | attach_record (record &rec) |
If the stream is attached to a log record, flushes internal buffers to complete all pending formatting operations. More... | |
BOOST_LOG_API void | detach_from_record () BOOST_NOEXCEPT |
The function resets the stream into a detached (default initialized) state. More... | |
void | attach (string_type &str) |
Attaches the stream to the string. More... | |
void | detach () |
Detaches the stream from the string. More... | |
string_type const & | str () const |
ostream_type & | stream () |
ostream_type const & | stream () const |
fmtflags | flags () const |
fmtflags | flags (fmtflags f) |
fmtflags | setf (fmtflags f) |
fmtflags | setf (fmtflags f, fmtflags mask) |
void | unsetf (fmtflags f) |
std::streamsize | precision () const |
std::streamsize | precision (std::streamsize p) |
std::streamsize | width () const |
std::streamsize | width (std::streamsize w) |
std::locale | getloc () const |
std::locale | imbue (std::locale const &loc) |
long & | iword (int index) |
void *& | pword (int index) |
void | register_callback (event_callback fn, int index) |
iostate | rdstate () const |
void | clear (iostate state=goodbit) |
void | setstate (iostate state) |
bool | good () const |
bool | eof () const |
bool | fail () const |
bool | bad () const |
iostate | exceptions () const |
void | exceptions (iostate s) |
ostream_type * | tie () const |
ostream_type * | tie (ostream_type *strm) |
streambuf_type * | rdbuf () const |
basic_formatting_ostream & | copyfmt (std::basic_ios< char_type, traits_type > &rhs) |
basic_formatting_ostream & | copyfmt (basic_formatting_ostream &rhs) |
char_type | fill () const |
char_type | fill (char_type ch) |
char | narrow (char_type ch, char def) const |
char_type | widen (char ch) const |
basic_formatting_ostream & | flush () |
pos_type | tellp () |
basic_formatting_ostream & | seekp (pos_type pos) |
basic_formatting_ostream & | seekp (off_type off, std::ios_base::seekdir dir) |
basic_formatting_ostream & | put (char_type c) |
aux::enable_if_char_type < OtherCharT, basic_formatting_ostream & > ::type | put (OtherCharT c) |
basic_formatting_ostream & | write (const char_type *p, std::streamsize size) |
aux::enable_if_char_type < OtherCharT, basic_formatting_ostream & > ::type | write (const OtherCharT *p, std::streamsize size) |
basic_formatting_ostream & | operator<< (ios_base_manip manip) |
basic_formatting_ostream & | operator<< (basic_ios_manip manip) |
basic_formatting_ostream & | operator<< (stream_manip manip) |
basic_formatting_ostream & | operator<< (char c) |
basic_formatting_ostream & | operator<< (const char *p) |
basic_formatting_ostream & | operator<< (wchar_t c) |
basic_formatting_ostream & | operator<< (const wchar_t *p) |
basic_formatting_ostream & | operator<< (char16_t c) |
basic_formatting_ostream & | operator<< (const char16_t *p) |
basic_formatting_ostream & | operator<< (char32_t c) |
basic_formatting_ostream & | operator<< (const char32_t *p) |
basic_formatting_ostream & | operator<< (bool value) |
basic_formatting_ostream & | operator<< (signed char value) |
basic_formatting_ostream & | operator<< (unsigned char value) |
basic_formatting_ostream & | operator<< (short value) |
basic_formatting_ostream & | operator<< (unsigned short value) |
basic_formatting_ostream & | operator<< (int value) |
basic_formatting_ostream & | operator<< (unsigned int value) |
basic_formatting_ostream & | operator<< (long value) |
basic_formatting_ostream & | operator<< (unsigned long value) |
basic_formatting_ostream & | operator<< (long long value) |
basic_formatting_ostream & | operator<< (unsigned long long value) |
basic_formatting_ostream & | operator<< (float value) |
basic_formatting_ostream & | operator<< (double value) |
basic_formatting_ostream & | operator<< (long double value) |
basic_formatting_ostream & | operator<< (const void *value) |
basic_formatting_ostream & | operator<< (std::basic_streambuf< char_type, traits_type > *buf) |
Static Public Member Functions | |
static int | xalloc () |
static bool | sync_with_stdio (bool sync=true) |
Logging record adapter with a streaming capability.
This class allows to compose the logging record message by streaming operations. It aggregates the log record and provides the standard output stream interface.
|
inherited |
Memory allocator.
typedef CharT boost::basic_record_ostream< CharT >::char_type |
Character type.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Integer type for characters.
|
inherited |
|
inherited |
Stream offset type.
|
inherited |
|
inherited |
Stream type.
|
inherited |
Stream position type.
|
inherited |
typedef std::basic_ostream< char_type > boost::basic_record_ostream< CharT >::stream_type |
Stream type.
|
inherited |
Stream buffer type.
typedef std::basic_string< char_type > boost::basic_record_ostream< CharT >::string_type |
String type to be used as a message text holder.
|
inherited |
Character traits.
|
inline |
Default constructor.
Creates an empty record that is equivalent to the invalid record handle. The stream capability is not available after construction.
!*this == true
|
inlineexplicit |
Constructor from a record object.
Attaches to the provided record.
!!rec == true
&this->get_record() == &rec
rec | The record handle being attached to |
|
inline |
Destructor.
Destroys the record, releases any sinks and attribute values that were involved in processing this record.
|
inlineinherited |
Attaches the stream to the string.
The string will be used to store the formatted characters.
str | The string buffer to attach. |
|
inline |
If the stream is attached to a log record, flushes internal buffers to complete all pending formatting operations.
Then reattaches the stream to another log record.
rec | New log record to attach to |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Detaches the stream from the string.
Any buffered data is flushed to the string.
BOOST_LOG_API void boost::basic_record_ostream< CharT >::detach_from_record | ( | ) |
The function resets the stream into a detached (default initialized) state.
Referenced by boost::basic_record_ostream< char_type >::attach_record(), and boost::basic_record_ostream< char_type >::~basic_record_ostream().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Referenced by boost::basic_record_ostream< char_type >::operator!().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Referenced by boost::basic_record_ostream< char_type >::get_record().
|
inline |
Flushes internal buffers to complete all pending formatting operations and returns the aggregated log record.
Referenced by boost::operator<<(), and boost::aux::record_pump< LoggerT >::~record_pump().
|
inline |
Flushes internal buffers to complete all pending formatting operations and returns the aggregated log record.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inline |
Conversion to an unspecified boolean type.
true
, if stream is valid and ready for formatting, false
, if the stream is not valid. The latter also applies to the case when the stream is not attached to a log record.Inverted conversion to an unspecified boolean type
false
, if stream is valid and ready for formatting, true
, if the stream is not valid. The latter also applies to the case when the stream is not attached to a log record.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlinestaticinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlinestaticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |