Joedb 10.3.2
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
File_Logger.h
Go to the documentation of this file.
1#ifndef joedb_File_Logger_declared
2#define joedb_File_Logger_declared
3
5
6#include <fstream>
7
8namespace joedb
9{
10 namespace detail
11 {
12 class File_Logger_Data
13 {
14 public:
15 std::ofstream ofs;
16 File_Logger_Data(const std::string &file_name):
17 ofs(file_name, std::ios::out | std::ios::trunc)
18 {
19 }
20 };
21 }
22
23 /// @ingroup error
24 class File_Logger: private detail::File_Logger_Data, public Stream_Logger
25 {
26 private:
27
28 public:
29 File_Logger(const std::string &file_name):
30 File_Logger_Data(file_name),
31 Stream_Logger(ofs)
32 {
33 }
34 };
35}
36
37#endif
File_Logger(const std::string &file_name)
Definition File_Logger.h:29