matador::log_sink Class Referenceabstract

Base class for all log sinks. More...

#include <log_sink.hpp>

Inherited by matador::basic_file_sink, and matador::rotating_file_sink.

Public Member Functions

virtual ~log_sink ()=default
 
virtual void write (const char *message, std::size_t size)=0
 
virtual void close ()=0
 

Detailed Description

Base class for all log sinks.

This class must be the base class for all log sinks and provides their interface

The main interface is the write(...) interface defining how the log message is written.

The close() interface defines a way to close the concrete log sink

Constructor & Destructor Documentation

◆ ~log_sink()

virtual matador::log_sink::~log_sink ( )
virtualdefault

Destroys the log sink

Member Function Documentation

◆ close()

virtual void matador::log_sink::close ( )
pure virtual

Closes the log sink if necessary.

Implemented in matador::basic_file_sink, matador::stdout_sink, matador::stderr_sink, and matador::rotating_file_sink.

◆ write()

virtual void matador::log_sink::write ( const char *  message,
std::size_t  size 
)
pure virtual

Writes the given log message with the given size to the concrete sink

Parameters
messageThe message to log
sizeThe size of the message

The documentation for this class was generated from the following file:
  • matador/logger/log_sink.hpp