Joedb 9.1.4
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
Stream_Logger.h
Go to the documentation of this file.
1#ifndef joedb_Stream_Logger
2#define joedb_Stream_Logger
3
5
6#include <ostream>
7
8namespace joedb
9{
10 /// @ingroup error
11 class Stream_Logger: public Logger
12 {
13 private:
14 std::ostream &out;
15
16 void write(const char *message) noexcept final
17 {
18 try
19 {
20 out << "joedb: " << message << '\n';
21 }
22 catch (...)
23 {
24 }
25 }
26
27 public:
28 Stream_Logger(std::ostream &out): out(out) {}
29 };
30}
31
32#endif
Stream_Logger(std::ostream &out)
Definition Blob.h:7