Merge pull request #555 from jpcima/windebug-sink

accept msvc_sink on all compilers, add name windebug_sink (fixes #554)
This commit is contained in:
Gabi Melman 2017-11-14 16:28:39 +02:00 committed by GitHub
commit 36c8e79a4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 2 deletions

View File

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