libadc-cxx 1.0.0
Structured logging for scientific computing
Loading...
Searching...
No Matches
none.ipp
Go to the documentation of this file.
3
4namespace adc {
5
6
7/*! \brief Message suppression publisher; it quietly ignores all
8 publication requests.
9 */
10class none_plugin : public publisher_api {
11
12private:
13 const std::string vers;
14 const std::vector<std::string> tags;
15 std::map< const std::string, const std::string> none_defaults;
16
17public:
18 none_plugin() : vers("1.0.0") , tags({"none"}) { }
19
20 int publish(std::shared_ptr<builder_api> /* b */) {
21 return 0;
22 }
23
24 int config(const std::map< std::string, std::string >& /* m */) {
25 return 0;
26 }
27
28 int config(const std::map< std::string, std::string >& /* m */, std::string_view /* env_prefix */) {
29 return 0;
30 }
31
32 const std::map< const std::string, const std::string> & get_option_defaults() {
33 return none_defaults;
34 }
35
36 int initialize() {
37 return 0;
38 }
39
40 void finalize() {
41 }
42
43 void pause() {
44 }
45
46 void resume() {
47 }
48
49 std::string_view name() const {
50 return "none";
51 }
52
53 std::string_view version() const {
54 return vers;
55 }
56
58};
59
60
61} // adc
Message suppression publisher; it quietly ignores all publication requests.
Definition none.ipp:10
int config(const std::map< std::string, std::string > &)
Configure the plugin with the options given.
Definition none.ipp:24
std::string_view version() const
Definition none.ipp:53
void resume()
Resume publishing Duplicate calls are allowed.
Definition none.ipp:46
const std::map< const std::string, const std::string > & get_option_defaults()
Look up the settable options and their defaults.
Definition none.ipp:32
int initialize()
Ready the plugin to publish following the configuration options set or defaulted.
Definition none.ipp:36
int config(const std::map< std::string, std::string > &, std::string_view)
Configure the plugin with the options given and the corresponding environment variables.
Definition none.ipp:28
void pause()
Pause publishing until a call to resume. Duplicate calls are allowed.
Definition none.ipp:43
void finalize()
Stop publishing and release any resources held for managing publication.
Definition none.ipp:40
std::string_view name() const
Definition none.ipp:49
int publish(std::shared_ptr< builder_api >)
Publish the content of the builder.
Definition none.ipp:20
Publisher plugin interface.
Definition publisher.hpp:44
Definition adc.hpp:75