|
CppTrail
|
A standard string-based log message. More...
#include <message.h>


Public Types | |
| using | impl_type = BasicMessageImpl< char_t > |
| Alias for the implementation type. | |
| using | char_type = char_t |
| Alias for the underlying character type. | |
| using | string_type = std::basic_string< char_type > |
| Alias for the basic_string type associated with this logger's encoding. | |
| using | string_view_type = std::basic_string_view< char_type > |
| Alias for the basic_string_view type associated with this logger's encoding. | |
Public Types inherited from CppTrail::BasicMessage< char_t > | |
| using | impl_type = BasicMessageImpl< char_t > |
| Alias for the implementation type. | |
| using | char_type = char_t |
| Alias for the underlying character type. | |
| using | string_type = std::basic_string< char_type > |
| Alias for the basic_string type associated with this logger's encoding. | |
Public Member Functions | |
| BasicStringMessage (string_type sLevel, string_type sMessage) | |
| Constructs a message from a string and a level. | |
| BasicStringMessage (string_type sLevel, string_view_type sMessage) | |
| Constructs a message from a string view and a level. | |
| template<typename T = char_t, typename std::enable_if< std::is_same< T, char >::value, int >::type = 0> | |
| BasicStringMessage (string_type sLevel, const std::exception &oMessage) | |
| Constructs a message from a standard exception and a level. | |
Public Member Functions inherited from CppTrail::BasicMessage< char_t > | |
| BasicMessage ()=default | |
| Default constructor. | |
| string_type | stealString () |
| Returns the string message to log. | |
| string_type | stealLevel () noexcept |
| Extracts the string representation of the log level. | |
| std::weak_ptr< impl_type > | getImplementation () noexcept |
| Retrieves a weak pointer to the internal implementation. | |
Additional Inherited Members | |
Protected Member Functions inherited from CppTrail::BasicMessage< char_t > | |
| BasicMessage (string_type sLevel, std::shared_ptr< impl_type > pImpl) | |
| Internal constructor for derived message types. | |
A standard string-based log message.
| char_t | The character type. |
|
inline |
Constructs a message from a string and a level.
| sLevel | The string representation of the log level. |
| sMessage | The message content to be stored. |
|
inline |
Constructs a message from a string view and a level.
| sLevel | The string representation of the log level. |
| sMessage | The string view content to copy into the message. |
|
inline |
Constructs a message from a standard exception and a level.
| T | Internal type for SFINAE check. |
| sLevel | The string representation of the log level. |
| oMessage | The exception object to extract the message from. |