mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
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.
This commit is contained in:
@@ -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};
|
||||
|
||||
Reference in New Issue
Block a user