diff --git a/src/internal/mnode_spdlog.hpp b/src/internal/mnode_spdlog.hpp new file mode 100644 index 0000000..13c5ad4 --- /dev/null +++ b/src/internal/mnode_spdlog.hpp @@ -0,0 +1,20 @@ +#ifndef A9EC2321_3F3B_49F7_9948_3F7C0983B312 +#define A9EC2321_3F3B_49F7_9948_3F7C0983B312 + +#include +#include + +namespace mesytec::mnode +{ + +inline std::shared_ptr get_spdlog_logger(const std::string &name) +{ + if (auto logger = spdlog::get(name)) + return logger; + + return spdlog::stdout_color_mt(name); +} + +} // namespace mesytec::mnode + +#endif /* A9EC2321_3F3B_49F7_9948_3F7C0983B312 */