From ed419140280553b070943b7ba539120a26ff5686 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Tue, 11 Dec 2018 07:42:05 +0100 Subject: wanda: restructure directory hierarchy --- include/wanda/logging.hpp | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 include/wanda/logging.hpp (limited to 'include/wanda/logging.hpp') diff --git a/include/wanda/logging.hpp b/include/wanda/logging.hpp new file mode 100644 index 0000000..b3c1665 --- /dev/null +++ b/include/wanda/logging.hpp @@ -0,0 +1,35 @@ +/** + * @file logging.hpp + * @author Felix Morgner (felix.morgner@gmail.com) + * @since 1.0.0 + */ + +#ifndef WANDA_LOGGING_HPP +#define WANDA_LOGGING_HPP + +#include +#include + +#include + +namespace wanda +{ + /** + * @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 + +#endif \ No newline at end of file -- cgit v1.2.3