diff options
author | 杨宇千 <crupest@outlook.com> | 2019-09-08 22:24:28 +0800 |
---|---|---|
committer | 杨宇千 <crupest@outlook.com> | 2019-09-08 22:24:28 +0800 |
commit | a8ba16ddab3291e59a33b36405462094f8cdf5bc (patch) | |
tree | aa849cdc1f9b4f7a0aa150f562b2e618c63ecceb /src/win/debug_logger.hpp | |
parent | 8b9a306d6f24dbc08aeee16b115260406e79126d (diff) | |
download | cru-a8ba16ddab3291e59a33b36405462094f8cdf5bc.tar.gz cru-a8ba16ddab3291e59a33b36405462094f8cdf5bc.tar.bz2 cru-a8ba16ddab3291e59a33b36405462094f8cdf5bc.zip |
...
Diffstat (limited to 'src/win/debug_logger.hpp')
-rw-r--r-- | src/win/debug_logger.hpp | 20 |
1 files changed, 20 insertions, 0 deletions
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 |