CppLogging
1.0.4.0
C++ Logging Library
|
Logging record. More...
#include <record.h>
Public Member Functions | |
Record () | |
Record (const Record &)=default | |
Record (Record &&)=default | |
~Record ()=default | |
Record & | operator= (const Record &)=default |
Record & | operator= (Record &&)=default |
bool | IsFormatStored () const noexcept |
Is the record contains stored format message and its arguments. More... | |
template<typename... T> | |
Record & | Format (fmt::format_string< T... > pattern, T &&... args) |
Format message and its arguments. More... | |
template<typename... T> | |
Record & | StoreFormat (fmt::format_string< T... > pattern, T &&... args) |
Store format message and its arguments. More... | |
template<typename Arg > | |
Record & | StoreCustom (const Arg &arg) |
Store custom format message and its arguments. More... | |
template<typename... Args> | |
Record & | StoreCustomFormat (std::string_view pattern, Args &&... args) |
size_t | StoreListBegin () |
Store list format message. More... | |
template<typename... Args> | |
Record & | StoreList (Args &&... args) |
template<typename... Args> | |
Record & | StoreListFormat (std::string_view pattern, Args &&... args) |
Record & | StoreListEnd (size_t begin) |
std::string | RestoreFormat () const |
Restore format message and its arguments. More... | |
void | Clear () |
Clear logging record. More... | |
void | swap (Record &record) noexcept |
Swap two instances. More... | |
Static Public Member Functions | |
static std::string | RestoreFormat (std::string_view pattern, const std::vector< uint8_t > &buffer, size_t offset, size_t size) |
Restore format of the custom data type. More... | |
Public Attributes | |
uint64_t | timestamp |
Timestamp of the logging record. More... | |
uint64_t | thread |
Thread Id of the logging record. More... | |
Level | level |
Level of the logging record. More... | |
std::string | logger |
Logger name of the logging record. More... | |
std::string | message |
Message of the logging record. More... | |
std::vector< uint8_t > | buffer |
Buffer of the logging record. More... | |
std::vector< uint8_t > | raw |
Record content after layout. More... | |
Friends | |
void | swap (Record &record1, Record &record2) noexcept |
Logging record.
Logging record encapsulates all required fields in a single instance:
Logging records are created inside Logger class and processed by logging appenders, filters and layouts.
Not thread-safe.
|
inline |
Definition at line 11 of file record.inl.
|
default |
|
default |
|
default |
|
inline |
Clear logging record.
Definition at line 449 of file record.inl.
|
inline |
Format message and its arguments.
Definition at line 361 of file record.inl.
|
inlinenoexcept |
|
inline |
|
static |
Restore format of the custom data type.
Definition at line 270 of file record.cpp.
|
inline |
Store custom format message and its arguments.
Definition at line 377 of file record.inl.
|
inline |
Definition at line 386 of file record.inl.
|
inline |
Store format message and its arguments.
Definition at line 368 of file record.inl.
|
inline |
Definition at line 427 of file record.inl.
|
inline |
|
inline |
Definition at line 441 of file record.inl.
|
inline |
Definition at line 436 of file record.inl.
|
inlinenoexcept |
Swap two instances.
Definition at line 460 of file record.inl.
Definition at line 472 of file record.inl.
std::vector<uint8_t> CppLogging::Record::buffer |
Level CppLogging::Record::level |
std::string CppLogging::Record::logger |
std::string CppLogging::Record::message |
std::vector<uint8_t> CppLogging::Record::raw |
uint64_t CppLogging::Record::thread |
uint64_t CppLogging::Record::timestamp |