matador::basic_file_sink Class Reference

A base class for file stream based sinks. More...

#include <basic_file_sink.hpp>

Inherits matador::log_sink.

Inherited by matador::file_sink, matador::stderr_sink, and matador::stdout_sink.

Public Member Functions

void write (const char *message, size_t size) override
 
void close () override
 
- Public Member Functions inherited from matador::log_sink
virtual ~log_sink ()=default
 
virtual void write (const char *message, std::size_t size)=0
 

Protected Member Functions

 basic_file_sink (FILE *f)
 

Detailed Description

A base class for file stream based sinks.

This class acts like a base class for all concrete sinks working with a file stream to write the log message.

Constructor & Destructor Documentation

◆ basic_file_sink()

matador::basic_file_sink::basic_file_sink ( FILE *  f)
explicitprotected

Creates a basic_file_sink with a given file stream

Parameters
fFile stream to write on

Member Function Documentation

◆ close()

void matador::basic_file_sink::close ( )
overridevirtual

Closes the internal file stream.

Implements matador::log_sink.

Reimplemented in matador::stdout_sink, and matador::stderr_sink.

◆ write()

void matador::basic_file_sink::write ( const char *  message,
size_t  size 
)
override

Writes the log message to the internal file stream.

Parameters
messageThe message to write
sizeThe size of the message

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