aboutsummaryrefslogtreecommitdiff
path: root/src/logging.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@protonmail.com>2019-11-08 08:10:16 +0100
committerWladimir J. van der Laan <laanwj@protonmail.com>2019-11-08 18:28:26 +0100
commit6b42b3ba9087225fddb91dd764c42c28d0c42d0f (patch)
tree4f8d748a6ed502d5b94659b3c9ff25082d14ea05 /src/logging.cpp
parent8021392b825c74312173f15eb937ba6d4aec3841 (diff)
Rename `db` log category to `walletdb` (like `coindb`)
Deprecate (but still accept) '-debug=db'.
Diffstat (limited to 'src/logging.cpp')
-rw-r--r--src/logging.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/logging.cpp b/src/logging.cpp
index b01177f23f..aece72cf3a 100644
--- a/src/logging.cpp
+++ b/src/logging.cpp
@@ -95,7 +95,15 @@ void BCLog::Logger::EnableCategory(BCLog::LogFlags flag)
bool BCLog::Logger::EnableCategory(const std::string& str)
{
BCLog::LogFlags flag;
- if (!GetLogCategory(flag, str)) return false;
+ if (!GetLogCategory(flag, str)) {
+ if (str == "db") {
+ // DEPRECATION: Added in 0.20, should start returning an error in 0.21
+ LogPrintf("Warning: logging category 'db' is deprecated, use 'walletdb' instead\n");
+ EnableCategory(BCLog::DB);
+ return true;
+ }
+ return false;
+ }
EnableCategory(flag);
return true;
}
@@ -139,7 +147,7 @@ const CLogCategoryDesc LogCategories[] =
{BCLog::HTTP, "http"},
{BCLog::BENCH, "bench"},
{BCLog::ZMQ, "zmq"},
- {BCLog::DB, "db"},
+ {BCLog::DB, "walletdb"},
{BCLog::RPC, "rpc"},
{BCLog::ESTIMATEFEE, "estimatefee"},
{BCLog::ADDRMAN, "addrman"},