diff --git a/include/spdlog/sinks/msvc_sink.h b/include/spdlog/sinks/msvc_sink.h index 6f772994..22b52c8f 100644 --- a/include/spdlog/sinks/msvc_sink.h +++ b/include/spdlog/sinks/msvc_sink.h @@ -5,12 +5,12 @@ #pragma once -#if defined(_MSC_VER) +#if defined(_WIN32) #include "base_sink.h" #include "../details/null_mutex.h" -#include +#include #include #include diff --git a/include/spdlog/sinks/windebug_sink.h b/include/spdlog/sinks/windebug_sink.h new file mode 100644 index 00000000..c22e9522 --- /dev/null +++ b/include/spdlog/sinks/windebug_sink.h @@ -0,0 +1,29 @@ +// +// Copyright(c) 2017 Alexander Dalshov. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once + +#if defined(_WIN32) + +#include "msvc_sink.h" + +namespace spdlog +{ +namespace sinks +{ + +/* +* Windows debug sink (logging using OutputDebugStringA, synonym for msvc_sink) +*/ +template +using windebug_sink = msvc_sink; + +typedef msvc_sink_mt windebug_sink_mt; +typedef msvc_sink_st windebug_sink_st; + +} +} + +#endif