aboutsummaryrefslogtreecommitdiff
path: root/src/logging.h
diff options
context:
space:
mode:
authorJames O'Beirne <james@chaincode.com>2018-05-05 14:14:43 -0400
committerJames O'Beirne <james.obeirne@gmail.com>2019-04-29 13:49:15 -0400
commit383b186c28979e42adbdd257a40114c0e3f14a83 (patch)
treef18370d19913f53d3e8a0f698c5afad7ec71b691 /src/logging.h
parentddd95ccb80da3d5cdf905192e23d54f303e6d83f (diff)
downloadbitcoin-383b186c28979e42adbdd257a40114c0e3f14a83.tar.xz
threads: prefix log messages with thread names
Introduce a new flag (`-logthreadnames`) which allows toggling of this behavior.
Diffstat (limited to 'src/logging.h')
-rw-r--r--src/logging.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/logging.h b/src/logging.h
index ac9d0dc0c7..e399d4c307 100644
--- a/src/logging.h
+++ b/src/logging.h
@@ -19,6 +19,7 @@
static const bool DEFAULT_LOGTIMEMICROS = false;
static const bool DEFAULT_LOGIPS = false;
static const bool DEFAULT_LOGTIMESTAMPS = true;
+static const bool DEFAULT_LOGTHREADNAMES = false;
extern const char * const DEFAULT_DEBUGLOGFILE;
extern bool fLogIPs;
@@ -81,6 +82,7 @@ namespace BCLog {
bool m_log_timestamps = DEFAULT_LOGTIMESTAMPS;
bool m_log_time_micros = DEFAULT_LOGTIMEMICROS;
+ bool m_log_threadnames = DEFAULT_LOGTHREADNAMES;
fs::path m_file_path;
std::atomic<bool> m_reopen_file{false};