diff --git a/include/spdlog/sinks/null_sink.h b/include/spdlog/sinks/null_sink.h index 05e85805..44a45a3e 100644 --- a/include/spdlog/sinks/null_sink.h +++ b/include/spdlog/sinks/null_sink.h @@ -8,7 +8,6 @@ #include "spdlog/details/synchronous_factory.h" #include -#include namespace spdlog { namespace sinks { @@ -17,15 +16,7 @@ template class null_sink : public base_sink { protected: - void sink_it_(const details::log_msg &) override - { - // prevent optimizer to remove this sink altogether (and do useful check while at it). - if(this->level() == level::off) - { - printf("null_sink: should never be called if its level is off!\n"); - abort(); - } - } + void sink_it_(const details::log_msg &) override {} void flush_() override {} };