accept msvc_sink on all compilers, add name windebug_sink (fixes #554)

This commit is contained in:
JP Cimalando 2017-11-14 14:21:14 +01:00
parent 8ca1d84a32
commit ecec210d0e
2 changed files with 31 additions and 2 deletions

View File

@ -5,12 +5,12 @@
#pragma once #pragma once
#if defined(_MSC_VER) #if defined(_WIN32)
#include "base_sink.h" #include "base_sink.h"
#include "../details/null_mutex.h" #include "../details/null_mutex.h"
#include <WinBase.h> #include <winbase.h>
#include <mutex> #include <mutex>
#include <string> #include <string>

View File

@ -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<class Mutex>
using windebug_sink = msvc_sink<Mutex>;
typedef msvc_sink_mt windebug_sink_mt;
typedef msvc_sink_st windebug_sink_st;
}
}
#endif