From 8111b77e95b083137faf888aeb5892073adf7ab4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 27 Jun 2018 16:59:37 +0200 Subject: New upstream version 2.0.0 --- lib/spdlog/sinks/msvc_sink.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 lib/spdlog/sinks/msvc_sink.h (limited to 'lib/spdlog/sinks/msvc_sink.h') diff --git a/lib/spdlog/sinks/msvc_sink.h b/lib/spdlog/sinks/msvc_sink.h new file mode 100644 index 0000000..09a5d67 --- /dev/null +++ b/lib/spdlog/sinks/msvc_sink.h @@ -0,0 +1,44 @@ +// +// Copyright(c) 2016 Alexander Dalshov. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#if defined(_WIN32) + +#include "../details/null_mutex.h" +#include "base_sink.h" + +#include + +#include +#include + +namespace spdlog { +namespace sinks { +/* + * MSVC sink (logging using OutputDebugStringA) + */ +template +class msvc_sink : public base_sink +{ +public: + explicit msvc_sink() {} + +protected: + void _sink_it(const details::log_msg &msg) override + { + OutputDebugStringA(msg.formatted.c_str()); + } + + void _flush() override {} +}; + +using msvc_sink_mt = msvc_sink; +using msvc_sink_st = msvc_sink; + +} // namespace sinks +} // namespace spdlog + +#endif -- cgit v1.2.3