From e58c98e224afcf4a28078344e0cd5f8c0e10961f Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Mon, 21 Oct 2024 11:17:23 +0200 Subject: add logging example + finish log color config integration --- src/crepe/api/Config.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/crepe/api') diff --git a/src/crepe/api/Config.h b/src/crepe/api/Config.h index d6ee8e8..f47f45b 100644 --- a/src/crepe/api/Config.h +++ b/src/crepe/api/Config.h @@ -11,14 +11,27 @@ public: ~Config() = default; public: + //! Retrieve handle to global Config instance static Config & get_instance() { static Config instance; return instance; } public: + //! Logging-related settings struct { + /** + * \brief Log level + * + * Only messages with equal or higher priority than this value will be + * logged. + */ util::log_level level = util::log_level::INFO; + /** + * \brief Colored log output + * + * Enables log coloring using ANSI escape codes. + */ bool color = true; } log; }; -- cgit v1.2.3