Ark Server API (ASE) - Wiki
Loading...
Searching...
No Matches
msvc_sink.h
Go to the documentation of this file.
1
//
2
// Copyright(c) 2016 Alexander Dalshov.
3
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
4
//
5
6
#
pragma
once
7
8
#
if
defined
(
_WIN32
)
9
10
#
include
"base_sink.h"
11
#
include
"../details/null_mutex.h"
12
13
#
include
<
winbase
.
h
>
14
15
#
include
<
mutex
>
16
#
include
<
string
>
17
18
namespace
spdlog
19
{
20
namespace
sinks
21
{
22
/*
23
* MSVC sink (logging using OutputDebugStringA)
24
*/
25
template
<
class
Mutex>
26
class
msvc_sink :
public
base_sink
< Mutex >
27
{
28
public
:
29
explicit
msvc_sink()
30
{
31
}
32
33
34
35
protected
:
36
void
_sink_it(
const
details
::
log_msg
& msg)
override
37
{
38
OutputDebugStringA(msg.formatted.c_str());
39
}
40
41
void
_flush()
override
42
{}
43
};
44
45
typedef
msvc_sink<
std
::mutex> msvc_sink_mt;
46
typedef
msvc_sink<
details
::
null_mutex
> msvc_sink_st;
47
48
}
49
}
50
51
#
endif
spdlog::sinks::base_sink
Definition
base_sink.h:26
spdlog::details
Definition
common.h:127
spdlog::sinks
Definition
common.h:55
spdlog
Definition
spdlog.h:22
std
Definition
json.hpp:4518
spdlog::details::log_msg
Definition
log_msg.h:20
spdlog::details::null_mutex
Definition
null_mutex.h:16
Downloads
ArkServerAPI_NEW
ASE
AseApi-main
version
Core
Public
Logger
spdlog
sinks
msvc_sink.h
Generated by
1.10.0