mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
logging: Unconditionally log levels >= WARN
Messages with level `WARN` or higher should be logged even when the category is not provided with `-debug=`, to make sure important warnings are not lost.
This commit is contained in:
parent
90e49c1ece
commit
bd971bffb0
4 changed files with 13 additions and 8 deletions
|
|
@ -19,7 +19,7 @@ public:
|
|||
// This code is adapted from posix_logger.h, which is why it is using vsprintf.
|
||||
// Please do not do this in normal code
|
||||
void Logv(const char * format, va_list ap) override {
|
||||
if (!LogAcceptCategory(BCLog::LEVELDB)) {
|
||||
if (!LogAcceptCategory(BCLog::LEVELDB, BCLog::Level::Debug)) {
|
||||
return;
|
||||
}
|
||||
char buffer[500];
|
||||
|
|
@ -186,7 +186,7 @@ CDBWrapper::~CDBWrapper()
|
|||
|
||||
bool CDBWrapper::WriteBatch(CDBBatch& batch, bool fSync)
|
||||
{
|
||||
const bool log_memory = LogAcceptCategory(BCLog::LEVELDB);
|
||||
const bool log_memory = LogAcceptCategory(BCLog::LEVELDB, BCLog::Level::Debug);
|
||||
double mem_before = 0;
|
||||
if (log_memory) {
|
||||
mem_before = DynamicMemoryUsage() / 1024.0 / 1024;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue