MCPcopy Create free account
hub / github.com/TranslucentTB/TranslucentTB / write

Method write

ProgramLog/lazyfilesink.cpp:85–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83template<typename Mutex>
84template<typename T>
85void lazy_file_sink<Mutex>::write(const T &thing)
86{
87 DWORD bytesWritten;
88 if (WriteFile(m_Handle.get(), thing.data(), wil::safe_cast<DWORD>(thing.size()), &bytesWritten, nullptr))
89 {
90 if (bytesWritten != thing.size()) [[unlikely]]
91 {
92 MessagePrint(spdlog::level::trace, L"Wrote less characters than there is in log entry?");
93 }
94 }
95 else
96 {
97 LastErrorHandle(spdlog::level::trace, L"Failed to write log entry to file.");
98 }
99}
100
101// We don't actually use the singlethreaded sink.
102template class lazy_file_sink<std::mutex>;

Callers

nothing calls this directly

Calls 1

getMethod · 0.80

Tested by

no test coverage detected