RSTools 3.1.0
Versatile C++20 utility library
Loading...
Searching...
No Matches
RST::Log::ISink Class Referenceabstract

Interface of the log destinations; derive from ASink to write a new sink. More...

#include <RST/log/Sinks/ISink.hpp>

Inheritance diagram for RST::Log::ISink:
RST::Log::ASink RST::Log::CallbackSink RST::Log::ConsoleSink RST::Log::DebuggerSink RST::Log::FileSink RST::Log::NullSink RST::Log::OStreamSink RST::Log::RingBufferSink RST::Log::RotatingFileSink RST::Log::SessionFileSink

Public Member Functions

virtual ~ISink ()=default
 
virtual void write (const LogMessage &message)=0
 Receives a message from a logger.
 
virtual void flush ()=0
 
virtual void setLevel (LogLevel level) noexcept=0
 Minimum level accepted by this sink.
 
virtual LogLevel getLevel () const noexcept=0
 
virtual bool shouldLog (LogLevel level) const noexcept=0
 
virtual void setFormatter (std::shared_ptr< Formatter > formatter)=0
 Shares a Formatter between sinks.
 
virtual void setPattern (std::string_view pattern)=0
 Formats the messages with pattern; see Formatter.
 

Detailed Description

Interface of the log destinations; derive from ASink to write a new sink.

Constructor & Destructor Documentation

◆ ~ISink()

virtual RST::Log::ISink::~ISink ( )
virtualdefault

Member Function Documentation

◆ write()

virtual void RST::Log::ISink::write ( const LogMessage &  message)
pure virtual

Receives a message from a logger.

Implemented in RST::Log::ASink.

◆ flush()

virtual void RST::Log::ISink::flush ( )
pure virtual

Implemented in RST::Log::ASink.

◆ setLevel()

virtual void RST::Log::ISink::setLevel ( LogLevel  level)
pure virtualnoexcept

Minimum level accepted by this sink.

Implemented in RST::Log::ASink.

◆ getLevel()

virtual LogLevel RST::Log::ISink::getLevel ( ) const
pure virtualnoexcept

Implemented in RST::Log::ASink.

◆ shouldLog()

virtual bool RST::Log::ISink::shouldLog ( LogLevel  level) const
pure virtualnoexcept

Implemented in RST::Log::ASink.

◆ setFormatter()

virtual void RST::Log::ISink::setFormatter ( std::shared_ptr< Formatter >  formatter)
pure virtual

Shares a Formatter between sinks.

Implemented in RST::Log::ASink.

◆ setPattern()

virtual void RST::Log::ISink::setPattern ( std::string_view  pattern)
pure virtual

Formats the messages with pattern; see Formatter.

Implemented in RST::Log::ASink.


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