Now serializing list of shared pointers instead of list of Service*.
[bpdyndnsd] / src / logger.h
CommitLineData
254bbf53
BS
1/** @file
2 * @brief Logger class header. This class represents the Logging facility.
3 *
4 *
5 *
6 * @copyright Intra2net AG
7 * @license GPLv2
8*/
9
10#ifndef LOGGER_H
11#define LOGGER_H
12
8bca3c5d 13#include <syslog.h>
59c8d63c 14#include <sstream>
254bbf53 15
27baf279 16
254bbf53
BS
17class Logger
18{
8bca3c5d
BS
19private:
20 int Loglevel;
21 bool Syslog;
254bbf53
BS
22
23public:
24
25 Logger();
26
27 ~Logger();
28
59c8d63c
BS
29 void log_notice(const std::string&);
30
31 void log_warning(const std::string&);
32
33 void log_error(const std::string&);
34
8bca3c5d
BS
35 void set_loglevel(const int);
36
37 int get_loglevel();
38
39 void set_syslog(const bool);
40
41 bool get_syslog();
42
43 void set_log_facility(const int, const bool);
44
45 void print_usage(const boost::program_options::options_description*);
254bbf53
BS
46
47 void print_version();
48
49 void print_cmd_parsed();
50
8bca3c5d 51 void print_destructor_call(const std::string&);
254bbf53 52
8bca3c5d 53 void print_constructor_call(const std::string&);
254bbf53 54
8bca3c5d 55 void print_update_service(const std::string&);
254bbf53 56
8bca3c5d 57 void print_unknown_cmd_option(const std::string&);
254bbf53 58
8bca3c5d 59 void print_unknown_protocol(const std::string&);
254bbf53 60
8bca3c5d 61 void print_load_service_conf(const std::string&);
254bbf53 62
8bca3c5d 63 void print_load_main_conf(const std::string&);
254bbf53 64
8bca3c5d 65 void print_unknown_service_conf_option(const std::string&);
254bbf53 66
8bca3c5d 67 void print_unknown_main_conf_option(const std::string&);
254bbf53 68
8bca3c5d 69 void print_error_opening(const std::string&);
254bbf53 70
8bca3c5d 71 void print_error_config_path(const std::string&);
254bbf53 72
8bca3c5d 73 void print_conf_loaded(const std::string&);
254bbf53 74
8bca3c5d 75 void print_conf_not_loaded(const std::string&);
254bbf53
BS
76
77 void print_missing_cmd_service_option();
388f4ab0
BS
78
79 void print_runnig_as_daemon(const int);
80
81 void print_daemon_mode(const bool);
82
83 void print_error_fork();
84
85 void print_pid_found(const int);
86
87 void print_process_already_running(const int);
c5675c01
BS
88
89 void print_caught_sigterm();
90
91 void print_caught_siguser1();
92
93 void print_caught_sighup();
8bca3c5d
BS
94
95 void print_error_setting_signal();
96
97 void print_init_log_facility();
98
99 void print_offline_mode();
27baf279
BS
100
101 void print_serialized_objects_success();
102
103 void print_deserialized_objects_success();
104
105 void print_service_object(const std::string&, const std::string&, const std::string&, const std::string&, const std::string&, const std::string&, const int);
254bbf53
BS
106};
107
108#endif