From a8ba16ddab3291e59a33b36405462094f8cdf5bc Mon Sep 17 00:00:00 2001 From: 杨宇千 Date: Sun, 8 Sep 2019 22:24:28 +0800 Subject: ... --- src/win/debug_logger.hpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/win/debug_logger.hpp (limited to 'src/win/debug_logger.hpp') diff --git a/src/win/debug_logger.hpp b/src/win/debug_logger.hpp new file mode 100644 index 00000000..ab6a2266 --- /dev/null +++ b/src/win/debug_logger.hpp @@ -0,0 +1,20 @@ +#include "cru/win/win_pre_config.hpp" + +#include "cru/common/logger.hpp" + +namespace cru::platform::win { + +class WinDebugLoggerSource : public ::cru::log::ILoggerSource { + public: + WinDebugLoggerSource() = default; + + CRU_DELETE_COPY(WinDebugLoggerSource) + CRU_DELETE_MOVE(WinDebugLoggerSource) + + ~WinDebugLoggerSource() = default; + + void Write(::cru::log::LogLevel level, const std::wstring_view& s) override { + ::OutputDebugStringW(s.data()); + } +}; +} // namespace cru::platform::win -- cgit v1.2.3