1
0
Fork 0

Adding Spectre/System/Log/FileWriter class.

This commit is contained in:
Henrik Hautakoski 2023-02-18 13:52:54 +01:00
parent 173aea31c9
commit 8db01a0957
3 changed files with 97 additions and 0 deletions

View file

@ -0,0 +1,30 @@
#ifndef SPECTRE_SYSTEM_LOG_FILEWRITER_H
#define SPECTRE_SYSTEM_LOG_FILEWRITER_H
#include <stdio.h>
#include <string>
#include <Spectre/System/Log/Writer.h>
namespace sp { namespace log {
class FileWriter : public Writer
{
public:
FileWriter(const std::string file = "");
~FileWriter();
bool open(const std::string file);
bool close();
size_t write(const void *data, size_t len);
protected:
FILE *m_fd;
};
} } // sp::log
#endif /* SPECTRE_SYSTEM_LOG_FILEWRITER_H */