diff options
author | Wladimir J. van der Laan <laanwj@protonmail.com> | 2019-11-08 08:10:16 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@protonmail.com> | 2019-11-08 18:28:26 +0100 |
commit | 6b42b3ba9087225fddb91dd764c42c28d0c42d0f (patch) | |
tree | 4f8d748a6ed502d5b94659b3c9ff25082d14ea05 /src/logging.cpp | |
parent | 8021392b825c74312173f15eb937ba6d4aec3841 (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.cpp | 12 |
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"}, |