1 //
2 // Copyright(c) 2015 Gabi Melman.
3 // Distributed under the MIT License (http://opensource.org/licenses/MIT)
4 //
5 
6 #pragma once
7 
8 #include "spdlog/details/null_mutex.h"
9 #include "spdlog/sinks/base_sink.h"
10 
11 #include <mutex>
12 
13 namespace spdlog {
14 namespace sinks {
15 
16 template<typename Mutex>
17 class null_sink : public base_sink<Mutex>
18 {
19 protected:
20     void sink_it_(const details::log_msg &) override {}
21     void flush_() override {}
22 };
23 
24 using null_sink_mt = null_sink<std::mutex>;
25 using null_sink_st = null_sink<details::null_mutex>;
26 
27 } // namespace sinks
28 } // namespace spdlog
29