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(_MSC_VER)
9 
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


ros_opcua_impl_freeopcua
Author(s): Denis Štogl
autogenerated on Tue Jan 19 2021 03:12:06