[Base] Fix FileLogSink not writing to log file

This commit is contained in:
Satori 2020-11-16 19:47:22 +00:00 committed by Rick Gibbed
parent 10d7bcde93
commit 52230fd4e8
1 changed files with 2 additions and 1 deletions

View File

@ -66,6 +66,7 @@ thread_local char thread_log_buffer_[64 * 1024];
void FileLogSink::Write(const char* buf, size_t size) {
if (file_) {
fwrite(buf, 1, size, file_);
}
}
@ -94,7 +95,7 @@ class Logger {
xe::threading::Wait(write_thread_.get(), true);
}
void AddLogSink(std::unique_ptr<LogSink> sink) {
void AddLogSink(std::unique_ptr<LogSink>&& sink) {
sinks_.push_back(std::move(sink));
}