CppLogging
1.0.4.0
C++ Logging Library
|
Memory appender. More...
#include <memory_appender.h>
Public Member Functions | |
MemoryAppender (size_t capacity=0) | |
Initialize the appender with a given capacity. More... | |
MemoryAppender (const MemoryAppender &)=delete | |
MemoryAppender (MemoryAppender &&)=delete | |
virtual | ~MemoryAppender ()=default |
MemoryAppender & | operator= (const MemoryAppender &)=delete |
MemoryAppender & | operator= (MemoryAppender &&)=delete |
std::vector< uint8_t > & | buffer () noexcept |
Get memory buffer. More... | |
const std::vector< uint8_t > & | buffer () const noexcept |
Get constant memory buffer. More... | |
void | AppendRecord (Record &record) override |
Append the given logging record. More... | |
Public Member Functions inherited from CppLogging::Appender | |
virtual void | Flush () |
Flush the logging appender. More... | |
Public Member Functions inherited from CppLogging::Element | |
virtual bool | IsStarted () const noexcept |
Is the logging element started? More... | |
virtual bool | Start () |
Start the logging element. More... | |
virtual bool | Stop () |
Stop the logging element. More... | |
Memory appender.
Memory appender collects all given logging records into growing memory buffer with the given initial capacity.
Not thread-safe.
Definition at line 23 of file memory_appender.h.
|
inlineexplicit |
Initialize the appender with a given capacity.
capacity | - Memory buffer capacity (default is 0) |
Definition at line 30 of file memory_appender.h.
|
delete |
|
delete |
|
virtualdefault |
|
overridevirtual |
Append the given logging record.
record | - Logging record |
Implements CppLogging::Appender.
Definition at line 13 of file memory_appender.cpp.
|
inlinenoexcept |
Get constant memory buffer.
Definition at line 41 of file memory_appender.h.
|
inlinenoexcept |
Get memory buffer.
Definition at line 39 of file memory_appender.h.
|
delete |
|
delete |