9 #ifndef CPPLOGGING_RECORD_H
10 #define CPPLOGGING_RECORD_H
13 #include "string/format.h"
14 #include "threads/thread.h"
53 std::vector<uint8_t>
raw;
67 template <
typename... T>
68 Record&
Format(fmt::format_string<T...> pattern, T&&... args);
71 template <
typename... T>
75 template <
typename Arg>
77 template <
typename... Args>
82 template <
typename... Args>
84 template <
typename... Args>
92 static std::string
RestoreFormat(std::string_view pattern,
const std::vector<uint8_t>&
buffer,
size_t offset,
size_t size);
void swap(Record &record) noexcept
Swap two instances.
void Clear()
Clear logging record.
Record & StoreListEnd(size_t begin)
std::string RestoreFormat() const
Restore format message and its arguments.
Level level
Level of the logging record.
std::vector< uint8_t > raw
Record content after layout.
std::string message
Message of the logging record.
Record & StoreCustomFormat(std::string_view pattern, Args &&... args)
Record & operator=(const Record &)=default
uint64_t thread
Thread Id of the logging record.
std::string logger
Logger name of the logging record.
std::vector< uint8_t > buffer
Buffer of the logging record.
Record(const Record &)=default
Record & StoreListFormat(std::string_view pattern, Args &&... args)
Record & StoreCustom(const Arg &arg)
Store custom format message and its arguments.
Record(Record &&)=default
size_t StoreListBegin()
Store list format message.
Record & operator=(Record &&)=default
bool IsFormatStored() const noexcept
Is the record contains stored format message and its arguments.
Record & Format(fmt::format_string< T... > pattern, T &&... args)
Format message and its arguments.
uint64_t timestamp
Timestamp of the logging record.
Record & StoreList(Args &&... args)
Record & StoreFormat(fmt::format_string< T... > pattern, T &&... args)
Store format message and its arguments.
Logging level definition.
C++ Logging project definitions.
Logging record inline implementation.