OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Classes | Public Member Functions | Private Attributes | List of all members
BufferLogSink Class Reference

#include <BufferLogSink.h>

Inheritance diagram for BufferLogSink:
LogSink

Classes

struct  LogMessage
 

Public Member Functions

virtual void write (const LogCategory &category, LogLevel level, std::string_view message) override
 
void flush (Logger *target)
 
- Public Member Functions inherited from LogSink
virtual ~LogSink ()=default
 
virtual void write (const LogCategory &category, LogLevel level, std::string_view message)=0
 

Private Attributes

std::vector< LogMessage_buffer
 

Additional Inherited Members

- Static Public Member Functions inherited from LogSink
static std::unique_ptr< LogSinkcreateDefaultSink ()
 

Member Function Documentation

◆ flush()

void BufferLogSink::flush ( Logger target)
inline

◆ write()

virtual void BufferLogSink::write ( const LogCategory category,
LogLevel  level,
std::string_view  message 
)
inlineoverridevirtual

Writes out the log message.

Calls into write from the Logger instance are guaranteed to be serialized with a mutex, so you don't need to do any locking in your implementation.

Parameters
categoryLog category.
levelLog level.
messageLog message.

Implements LogSink.

Member Data Documentation

◆ _buffer

std::vector<LogMessage> BufferLogSink::_buffer
private

The documentation for this class was generated from the following file: