Joedb 10.3.0
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
Parsed_Logger.h
Go to the documentation of this file.
1#ifndef joedb_Parsed_Logger_declared
2#define joedb_Parsed_Logger_declared
3
6
7#include <memory>
8#include <vector>
9
10namespace joedb
11{
13 {
14 public:
15 enum class Type
16 {
17 none,
18 clog,
19 system
20 };
21
22 private:
23 const Type type;
24 const int log_level;
25 const std::string tag;
26
27 std::unique_ptr<Logger> logger;
28
29 static const std::vector<const char *> type_string;
30
31 public:
32 Parsed_Logger(Arguments &args, Type default_log_type = Type::clog);
33
34 Logger &get() const {return *logger;}
35 int get_log_level() const {return log_level;}
36 const std::string &get_tag() const {return tag;}
37 };
38}
39
40#endif
Class for conveniently parsing command-line arguments.
Definition Arguments.h:19
Logger & get() const
int get_log_level() const
const std::string & get_tag() const