diff options
author | Anthony Towns <aj@erisian.com.au> | 2023-09-12 14:27:26 +1000 |
---|---|---|
committer | Anthony Towns <aj@erisian.com.au> | 2023-12-15 11:03:25 +1000 |
commit | fbd7642c8e5b70327e019382320f5ef0a651ecc5 (patch) | |
tree | 7d8c0aa37cbe659a7a237cc4d2aa18663688ad05 /src/logging.h | |
parent | 782bb6a05663ad7a53908e910d0f42b49b881e09 (diff) | |
download | bitcoin-fbd7642c8e5b70327e019382320f5ef0a651ecc5.tar.xz |
logging: add -loglevelalways=1 option
This option tells the logging system to always include a "[cat:level]"
prefix, so [net] becomes [net:debug], LogInfo/LogPrint statements will have
an [all:info] prefix, and LogWarning and LogError logs will become
[all:warning] and [all:error]. This may be easier for automated parsing
of logs, particularly if additional prefixes such as thread or source
location are enabled.
Diffstat (limited to 'src/logging.h')
-rw-r--r-- | src/logging.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/logging.h b/src/logging.h index b93617f7ad..9b56f7af0d 100644 --- a/src/logging.h +++ b/src/logging.h @@ -25,6 +25,7 @@ static const bool DEFAULT_LOGIPS = false; static const bool DEFAULT_LOGTIMESTAMPS = true; static const bool DEFAULT_LOGTHREADNAMES = false; static const bool DEFAULT_LOGSOURCELOCATIONS = false; +static constexpr bool DEFAULT_LOGLEVELALWAYS = false; extern const char * const DEFAULT_DEBUGLOGFILE; extern bool fLogIPs; @@ -119,6 +120,7 @@ namespace BCLog { bool m_log_time_micros = DEFAULT_LOGTIMEMICROS; bool m_log_threadnames = DEFAULT_LOGTHREADNAMES; bool m_log_sourcelocations = DEFAULT_LOGSOURCELOCATIONS; + bool m_always_print_category_level = DEFAULT_LOGLEVELALWAYS; fs::path m_file_path; std::atomic<bool> m_reopen_file{false}; |