galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
FileSink.hpp
Go to the documentation of this file.
1
7
8#ifndef GALAXY_LOGGING_FILESINK_HPP_
9#define GALAXY_LOGGING_FILESINK_HPP_
10
11#include <fstream>
12
14
15namespace galaxy
16{
17 class FileSink final : public Sink
18 {
19 public:
25 FileSink(std::string_view file);
26
30 virtual ~FileSink() noexcept;
31
37 void sink(const LogMessage& message) override;
38
39 private:
43 std::ofstream m_file_stream;
44 };
45} // namespace galaxy
46
47#endif
void sink(const LogMessage &message) override
Sink the message.
Definition FileSink.cpp:54
FileSink(std::string_view file)
Constructor.
Definition FileSink.cpp:16
std::ofstream m_file_stream
File stream to write to.
Definition FileSink.hpp:43
virtual ~FileSink() noexcept
Destructor.
Definition FileSink.cpp:49
A source for log messages to be recorded to.
Definition Sink.hpp:21
Timer.hpp galaxy.
Definition Timer.cpp:18
Parts of a log message to be passed to sinks.