Skip to content

Commit

Permalink
OrcLib: Log: always close file on destruction
Browse files Browse the repository at this point in the history
  • Loading branch information
fabienfl-orc committed Jan 26, 2021
1 parent aaba92b commit 92a756f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/OrcLib/Log/Sink/FileSink.h
Expand Up @@ -41,6 +41,8 @@ class FileSink : public spdlog::sinks::base_sink<Mutex>
{
}

~FileSink() override { Close(); }

void Open(const std::filesystem::path& path, std::error_code& ec)
{
std::lock_guard<Mutex> lock(mutex_);
Expand Down

0 comments on commit 92a756f

Please sign in to comment.