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) | |
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.
|
explicitprotected |
Creates a basic_file_sink with a given file stream
f | File stream to write on |
|
overridevirtual |
Closes the internal file stream.
Implements matador::log_sink.
Reimplemented in matador::stdout_sink, and matador::stderr_sink.
|
override |
Writes the log message to the internal file stream.
message | The message to write |
size | The size of the message |