diff options
author | jimmyorourke <jimmy.orourke@thalmic.com> | 2019-09-03 21:16:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-03 21:16:39 +0300 |
commit | 3a13e76bb1a8c504ca0f51a8e6503ccd1d19b5be (patch) | |
tree | ff4ebdcf37c4ca8c4bfe21f54aefad0475a2a357 | |
parent | 139c0d135f303946bd542a9bc2d6b18d6a7415bb (diff) |
Use WriteFile rather than WriteConsole to be able to use file handles or pipes
-rw-r--r-- | include/spdlog/sinks/wincolor_sink.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/spdlog/sinks/wincolor_sink.h b/include/spdlog/sinks/wincolor_sink.h index 402fa121..4567a2e3 100644 --- a/include/spdlog/sinks/wincolor_sink.h +++ b/include/spdlog/sinks/wincolor_sink.h @@ -104,7 +104,7 @@ private: void _print_range(const details::log_msg &msg, size_t start, size_t end) { DWORD size = static_cast<DWORD>(end - start); - WriteConsoleA(out_handle_, msg.formatted.data() + start, size, nullptr, nullptr); + WriteFile(out_handle_, msg.formatted.data() + start, size, nullptr, nullptr); } }; |