boost::log::basic_record — Logging record class.
// In header: <boost/log/core/record.hpp> template<typename CharT> class basic_record { public: // types typedef CharT char_type; // Character type. typedef basic_core< char_type > core_type; // Logging core type. typedef std::basic_string< char_type > string_type; // String type to be used as a message text holder. typedef basic_attribute_values_view< char_type > values_view_type; // Attribute values view type. // construct/copy/destruct basic_record(); explicit basic_record(record_handle const &); ~basic_record(); // public member functions record_handle handle() const; values_view_type const & attribute_values() const; string_type & message(); string_type const & message() const; bool operator==(basic_record const &) const; bool operator!=(basic_record const &) const; bool operator!() const; void swap(basic_record &); void reset(); void detach_from_thread(); };
The logging record incapsulates all information related to a single logging statement, in particular, attribute values view and the log message string.
basic_record
public
construct/copy/destructbasic_record();
Default constructor. Creates an empty record that is equivalent to the invalid record handle.
Postconditions: |
|
explicit basic_record(record_handle const & rec);
Conversion from a record handle. Adopts the record referenced by the handle.
Parameters: |
|
||
Requires: | The handle, if valid, have been issued by the logging core with the same character type as the record being constructed. |
||
Postconditions: |
|
~basic_record();
Destructor. Destroys the record, releases any sinks and attribute values that were involved in processing this record.
basic_record
public member functionsrecord_handle handle() const;
Returns: | The handle to the record |
values_view_type const & attribute_values() const;
Requires: |
|
Returns: | A reference to the set of attribute values attached to this record |
string_type & message();
Requires: |
|
Returns: | A reference to the log record message string |
string_type const & message() const;
Requires: |
|
Returns: | A reference to the log record message string |
bool operator==(basic_record const & that) const;
Equality comparison
Parameters: |
|
||
Returns: |
|
bool operator!=(basic_record const & that) const;
Inequality comparison
Parameters: |
|
||
Returns: |
|
bool operator!() const;
Conversion to an unspecified boolean type
Inverted conversion to an unspecified boolean type
Returns: |
|
Returns: |
|
void swap(basic_record & that);
Swaps two handles
Parameters: |
|
void reset();
Resets the log record handle. If there are no other handles left, the log record is closed and all resources referenced by the record are released.
Postconditions: |
|
void detach_from_thread();
The function ensures that the log record does not depend on any thread-specific data.
Requires: |
|