aboutsummaryrefslogtreecommitdiff
path: root/src/win/debug_logger.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/win/debug_logger.hpp')
-rw-r--r--src/win/debug_logger.hpp20
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