1
0
mirror of https://github.com/gabime/spdlog.git synced 2025-04-29 20:13:52 +00:00

Use WriteFile rather than WriteConsole to be able to use file handles or pipes

This commit is contained in:
jimmyorourke 2019-09-03 14:16:39 -04:00 committed by GitHub
parent 139c0d135f
commit 3a13e76bb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,7 +104,7 @@ private:
void _print_range(const details::log_msg &msg, size_t start, size_t end) void _print_range(const details::log_msg &msg, size_t start, size_t end)
{ {
DWORD size = static_cast<DWORD>(end - start); 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);
} }
}; };