Skip to content

Commit

Permalink
Add VALIDATIONINTERFACE to BCLog::LogFlags
Browse files Browse the repository at this point in the history
This flag is for logging from within CValidationInterface (see bitcoin#12994).
A separate flag is desirable as the logging can be noisy and thus may
need to be disabled without affecting other logging.
  • Loading branch information
Jeffrey Czyz committed Aug 22, 2019
1 parent 5c3f8e1 commit 082012a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 23 deletions.
1 change: 1 addition & 0 deletions src/logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ const CLogCategoryDesc LogCategories[] =
{BCLog::COINDB, "coindb"},
{BCLog::QT, "qt"},
{BCLog::LEVELDB, "leveldb"},
{BCLog::VALIDATIONINTERFACE, "validationinterface"},
{BCLog::ALL, "1"},
{BCLog::ALL, "all"},
};
Expand Down
47 changes: 24 additions & 23 deletions src/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,29 +32,30 @@ struct CLogCategoryActive

namespace BCLog {
enum LogFlags : uint32_t {
NONE = 0,
NET = (1 << 0),
TOR = (1 << 1),
MEMPOOL = (1 << 2),
HTTP = (1 << 3),
BENCH = (1 << 4),
ZMQ = (1 << 5),
DB = (1 << 6),
RPC = (1 << 7),
ESTIMATEFEE = (1 << 8),
ADDRMAN = (1 << 9),
SELECTCOINS = (1 << 10),
REINDEX = (1 << 11),
CMPCTBLOCK = (1 << 12),
RAND = (1 << 13),
PRUNE = (1 << 14),
PROXY = (1 << 15),
MEMPOOLREJ = (1 << 16),
LIBEVENT = (1 << 17),
COINDB = (1 << 18),
QT = (1 << 19),
LEVELDB = (1 << 20),
ALL = ~(uint32_t)0,
NONE = 0,
NET = (1 << 0),
TOR = (1 << 1),
MEMPOOL = (1 << 2),
HTTP = (1 << 3),
BENCH = (1 << 4),
ZMQ = (1 << 5),
DB = (1 << 6),
RPC = (1 << 7),
ESTIMATEFEE = (1 << 8),
ADDRMAN = (1 << 9),
SELECTCOINS = (1 << 10),
REINDEX = (1 << 11),
CMPCTBLOCK = (1 << 12),
RAND = (1 << 13),
PRUNE = (1 << 14),
PROXY = (1 << 15),
MEMPOOLREJ = (1 << 16),
LIBEVENT = (1 << 17),
COINDB = (1 << 18),
QT = (1 << 19),
LEVELDB = (1 << 20),
VALIDATIONINTERFACE = (1 << 21),
ALL = ~(uint32_t)0,
};

class Logger
Expand Down

0 comments on commit 082012a

Please sign in to comment.