From 577fc0845718ed8ad5bebf02a277c0579a817f77 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Fri, 17 May 2024 17:58:38 +0200 Subject: wanda: restructure source layout --- source/lib/include/wanda/system/logging.hpp | 35 +++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 source/lib/include/wanda/system/logging.hpp (limited to 'source/lib/include/wanda/system/logging.hpp') diff --git a/source/lib/include/wanda/system/logging.hpp b/source/lib/include/wanda/system/logging.hpp new file mode 100644 index 0000000..8a9a90e --- /dev/null +++ b/source/lib/include/wanda/system/logging.hpp @@ -0,0 +1,35 @@ +/** + * @file logging.hpp + * @author Felix Morgner (felix.morgner@gmail.com) + * @since 1.0.0 + */ + +#ifndef WANDA_SYSTEM_LOGGING_HPP +#define WANDA_SYSTEM_LOGGING_HPP + +#include +#include + +#include + +namespace wanda::system +{ + /** + * @brief A covenience alias to represent a handle for a logger + */ + using logger_ptr = std::shared_ptr; + + /** + * @brief Initialize the shared logger + * + * @note The logger will only ever be initialized once, even if this function is called multiple times + */ + void initialize_logger(spdlog::sink_ptr sink = std::make_shared()); + + /** + * @brief Get the shared logger + */ + logger_ptr get_logger(); +} // namespace wanda::system + +#endif \ No newline at end of file -- cgit v1.2.3