SA_Logger
Sapphire's Suite's C++ Logger.
Loading...
Searching...
No Matches
FileLogStream.hpp
Go to the documentation of this file.
1// Copyright (c) 2023 Sapphire's Suite. All Rights Reserved.
2
3#pragma once
4
5#ifndef SAPPHIRE_LOGGER_FILE_LOG_STREAM_GUARD
6#define SAPPHIRE_LOGGER_FILE_LOG_STREAM_GUARD
7
8#include <fstream>
9
11
22namespace SA
23{
26 {
27 protected:
29 std::wofstream mHandle;
30
36 void CreateLogFile(const std::string& _fileFullPath);
37
38
39 void Output(const Log& _log) override final;
40
41 public:
47 FileLogStream(const std::string& _fileFullPath = "Logs/log.txt") noexcept;
48
52 ~FileLogStream() noexcept;
53
54
55 void Flush() override final;
56 };
57}
58
59
62#endif // GUARD
Log base stream implementation.
Abstract log stream class.
Definition ALogStream.hpp:27
Log file stream type.
Definition FileLogStream.hpp:26
FileLogStream(const std::string &_fileFullPath="Logs/log.txt") noexcept
void Output(const Log &_log) override final
Output a log in stream.
std::wofstream mHandle
Handled file stream.
Definition FileLogStream.hpp:29
void Flush() override final
Force the stream to flush.
void CreateLogFile(const std::string &_fileFullPath)
Create log and log backup files.
Log type implementation.
Definition Log.hpp:25