diff options
author | MarcoFalke <falke.marco@gmail.com> | 2019-06-20 09:34:45 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2019-06-20 12:12:24 -0400 |
commit | fabc57e07dc34c103552cb51c9277bb48ef97739 (patch) | |
tree | 34b541df706817511b175e3a75e3060d593d99a5 /src/logging.cpp | |
parent | fa4a04a5a942d582c62773d815c7e1e9897975d0 (diff) |
test: Log to debug.log in all tests
Diffstat (limited to 'src/logging.cpp')
-rw-r--r-- | src/logging.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/logging.cpp b/src/logging.cpp index 418a701179..dc2d130a2a 100644 --- a/src/logging.cpp +++ b/src/logging.cpp @@ -75,6 +75,14 @@ bool BCLog::Logger::StartLogging() return true; } +void BCLog::Logger::DisconnectTestLogger() +{ + std::lock_guard<std::mutex> scoped_lock(m_cs); + m_buffering = true; + if (m_fileout != nullptr) fclose(m_fileout); + m_fileout = nullptr; +} + void BCLog::Logger::EnableCategory(BCLog::LogFlags flag) { m_categories |= flag; |