aboutsummaryrefslogtreecommitdiff
path: root/src/win/debug_logger.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2019-12-12 23:26:04 +0800
committercrupest <crupest@outlook.com>2019-12-12 23:26:04 +0800
commitf2aa96fba0b72eeeadf5160ea5df2c8143ec8aa0 (patch)
treeb045d35bb2cf7281ab69abbd51302c85ea9ec3ef /src/win/debug_logger.hpp
parent02f46ada9ef85165759f5e58d665510077149ef3 (diff)
downloadcru-f2aa96fba0b72eeeadf5160ea5df2c8143ec8aa0.tar.gz
cru-f2aa96fba0b72eeeadf5160ea5df2c8143ec8aa0.tar.bz2
cru-f2aa96fba0b72eeeadf5160ea5df2c8143ec8aa0.zip
...
Diffstat (limited to 'src/win/debug_logger.hpp')
-rw-r--r--src/win/debug_logger.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/win/debug_logger.hpp b/src/win/debug_logger.hpp
index 53c4859b..c5321828 100644
--- a/src/win/debug_logger.hpp
+++ b/src/win/debug_logger.hpp
@@ -1,6 +1,7 @@
#include "cru/win/win_pre_config.hpp"
#include "cru/common/logger.hpp"
+#include "cru/win/string.hpp"
namespace cru::platform::win {
@@ -14,7 +15,8 @@ class WinDebugLoggerSource : public ::cru::log::ILogSource {
~WinDebugLoggerSource() = default;
void Write(::cru::log::LogLevel level, const std::string_view& s) override {
- ::OutputDebugStringA(s.data());
+ const std::wstring&& ws = ToUtf16String(s);
+ ::OutputDebugStringW(ws.data());
}
};
} // namespace cru::platform::win