From 1a20dd80971cd18f625b32a9d20992aee3d2ae81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20L=C3=BCke?= Date: Sat, 7 Dec 2024 18:34:27 +0100 Subject: [PATCH] idea about how the logging interface could look like --- include/mesytec-mnode/mnode_logging.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 include/mesytec-mnode/mnode_logging.h diff --git a/include/mesytec-mnode/mnode_logging.h b/include/mesytec-mnode/mnode_logging.h new file mode 100644 index 0000000..7d59f52 --- /dev/null +++ b/include/mesytec-mnode/mnode_logging.h @@ -0,0 +1,23 @@ +#ifndef C3F17743_0B87_45E4_B864_8BE35775019D +#define C3F17743_0B87_45E4_B864_8BE35775019D + +#include +#include + +// Public interface to the internal logging system. Not a logging utility library. + +namespace mesytec::mnode +{ + +// Levels are: trace, debug, info, warning, error, critical, off + +void set_log_level(const std::string &level); +void set_log_level(const std::string &logger_name, const std::string &level); + +// Only the names of loggers that have been created at runtime are returned. +// It's not a static result. +std::vector get_logger_names(); + +} + +#endif /* C3F17743_0B87_45E4_B864_8BE35775019D */