aboutsummaryrefslogtreecommitdiff
path: root/src/logging.cpp
diff options
context:
space:
mode:
authorAnthony Towns <aj@erisian.com.au>2018-05-03 10:14:01 +1000
committerMarcoFalke <falke.marco@gmail.com>2019-05-28 14:26:06 -0400
commit412987430c98e78ccda033ab1cf7a176a4c0b835 (patch)
tree5803f80fad55ff4262cd17a15c288980456a6fa6 /src/logging.cpp
parent8ab4f282c06d67074b872dbda0be37636fdd5186 (diff)
downloadbitcoin-412987430c98e78ccda033ab1cf7a176a4c0b835.tar.xz
Replace OpenDebugLog() with StartLogging()
StartLogging() is used to mark the start of logging generically, whether using -printtoconsole or -debuglogfile.
Diffstat (limited to 'src/logging.cpp')
-rw-r--r--src/logging.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/logging.cpp b/src/logging.cpp
index 3eda4995db..f9d9d9c56b 100644
--- a/src/logging.cpp
+++ b/src/logging.cpp
@@ -39,9 +39,10 @@ static int FileWriteStr(const std::string &str, FILE *fp)
return fwrite(str.data(), 1, str.size(), fp);
}
-bool BCLog::Logger::OpenDebugLog()
+bool BCLog::Logger::StartLogging()
{
std::lock_guard<std::mutex> scoped_lock(m_file_mutex);
+ if (!m_print_to_file) return true;
assert(m_fileout == nullptr);
assert(!m_file_path.empty());