Changeset View
Changeset View
Standalone View
Standalone View
src/logging.cpp
Show First 20 Lines • Show All 310 Lines • ▼ Show 20 Lines | |||||
void BCLog::Logger::EnableCategory(LogFlags category) { | void BCLog::Logger::EnableCategory(LogFlags category) { | ||||
m_categories |= category; | m_categories |= category; | ||||
} | } | ||||
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)) { | if (!GetLogCategory(flag, str)) { | ||||
if (str == "db") { | |||||
// DEPRECATION: Added in 0.22.4, should start returning an error in | |||||
// a future release | |||||
LogPrintf("Warning: logging category 'db' is deprecated, use " | |||||
"'walletdb' instead\n"); | |||||
EnableCategory(BCLog::WALLETDB); | |||||
return true; | |||||
} | |||||
return false; | return false; | ||||
} | } | ||||
EnableCategory(flag); | EnableCategory(flag); | ||||
return true; | return true; | ||||
} | } | ||||
void BCLog::Logger::DisableCategory(LogFlags category) { | void BCLog::Logger::DisableCategory(LogFlags category) { | ||||
m_categories &= ~category; | m_categories &= ~category; | ||||
Show All 26 Lines |