From f9bc3c9d1834cb8bd5f872b749b057c33e8b0102 Mon Sep 17 00:00:00 2001 From: BobTheBob <32057864+BobTheBob9@users.noreply.github.com> Date: Wed, 24 Aug 2022 00:32:31 +0100 Subject: Adjust folder structure (#242) * Adjust folder structure * change launcher directory name --- NorthstarDLL/include/spdlog/sinks/null_sink.h | 44 +++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 NorthstarDLL/include/spdlog/sinks/null_sink.h (limited to 'NorthstarDLL/include/spdlog/sinks/null_sink.h') diff --git a/NorthstarDLL/include/spdlog/sinks/null_sink.h b/NorthstarDLL/include/spdlog/sinks/null_sink.h new file mode 100644 index 00000000..eb832801 --- /dev/null +++ b/NorthstarDLL/include/spdlog/sinks/null_sink.h @@ -0,0 +1,44 @@ +// Copyright(c) 2015-present, Gabi Melman & spdlog contributors. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) + +#pragma once + +#include +#include +#include + +#include + +namespace spdlog { +namespace sinks { + +template +class null_sink : public base_sink +{ +protected: + void sink_it_(const details::log_msg &) override {} + void flush_() override {} +}; + +using null_sink_mt = null_sink; +using null_sink_st = null_sink; + +} // namespace sinks + +template +inline std::shared_ptr null_logger_mt(const std::string &logger_name) +{ + auto null_logger = Factory::template create(logger_name); + null_logger->set_level(level::off); + return null_logger; +} + +template +inline std::shared_ptr null_logger_st(const std::string &logger_name) +{ + auto null_logger = Factory::template create(logger_name); + null_logger->set_level(level::off); + return null_logger; +} + +} // namespace spdlog -- cgit v1.2.3