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

#include <DistLogSink.h>

Inheritance diagram for DistLogSink:
LogSink

Public Member Functions

void write (const LogCategory &category, LogLevel level, std::string_view message) override
 
void addLogSink (LogSink *logSink)
 
void removeLogSink (LogSink *logSink)
 
- 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< LogSink * > _logSinks
 

Additional Inherited Members

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

Detailed Description

Log sink that distributes what's written into it into other log sinks.

Member Function Documentation

◆ addLogSink()

void DistLogSink::addLogSink ( LogSink logSink)

◆ removeLogSink()

void DistLogSink::removeLogSink ( LogSink logSink)

◆ write()

void DistLogSink::write ( const LogCategory category,
LogLevel  level,
std::string_view  message 
)
overridevirtual

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

◆ _logSinks

std::vector<LogSink *> DistLogSink::_logSinks
private

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