mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
Rename db log category to walletdb (like coindb)
Deprecate (but still accept) '-debug=db'.
This commit is contained in:
@@ -95,7 +95,15 @@ void BCLog::Logger::EnableCategory(BCLog::LogFlags flag)
|
|||||||
bool BCLog::Logger::EnableCategory(const std::string& str)
|
bool BCLog::Logger::EnableCategory(const std::string& str)
|
||||||
{
|
{
|
||||||
BCLog::LogFlags flag;
|
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);
|
EnableCategory(flag);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -139,7 +147,7 @@ const CLogCategoryDesc LogCategories[] =
|
|||||||
{BCLog::HTTP, "http"},
|
{BCLog::HTTP, "http"},
|
||||||
{BCLog::BENCH, "bench"},
|
{BCLog::BENCH, "bench"},
|
||||||
{BCLog::ZMQ, "zmq"},
|
{BCLog::ZMQ, "zmq"},
|
||||||
{BCLog::DB, "db"},
|
{BCLog::DB, "walletdb"},
|
||||||
{BCLog::RPC, "rpc"},
|
{BCLog::RPC, "rpc"},
|
||||||
{BCLog::ESTIMATEFEE, "estimatefee"},
|
{BCLog::ESTIMATEFEE, "estimatefee"},
|
||||||
{BCLog::ADDRMAN, "addrman"},
|
{BCLog::ADDRMAN, "addrman"},
|
||||||
|
|||||||
Reference in New Issue
Block a user