matador::file_sink Class Reference

A file sink writeing log message to one file. More...

#include <file_sink.hpp>

Inherits matador::basic_file_sink.

Public Member Functions

 file_sink (const std::string &path)
 
 file_sink (const char *path)
 
 ~file_sink () override
 
std::string path () const
 
- Public Member Functions inherited from matador::basic_file_sink
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
 

Additional Inherited Members

- Protected Member Functions inherited from matador::basic_file_sink
 basic_file_sink (FILE *f)
 

Detailed Description

A file sink writeing log message to one file.

The log sink writes all log message to one single file identified by a given path.

Note because by there ist no limit the file grows infinitely.

Constructor & Destructor Documentation

◆ file_sink() [1/2]

matador::file_sink::file_sink ( const std::string &  path)
explicit

Creates a file_sink with the given path. If the the path doesn't exists, it is created.

Parameters
pathThe log file to write to

◆ file_sink() [2/2]

matador::file_sink::file_sink ( const char *  path)
explicit

Creates a file_sink with the given path. If the the path doesn't exists, it is created.

Parameters
pathThe log file to write to

◆ ~file_sink()

matador::file_sink::~file_sink ( )
override

Destroys the file_sink

Member Function Documentation

◆ path()

std::string matador::file_sink::path ( ) const

Returns the path to the log file.

Returns
The path to the log file

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