aboutsummaryrefslogtreecommitdiff
path: root/src/dbwrapper.cpp
diff options
context:
space:
mode:
authorlaanwj <126646+laanwj@users.noreply.github.com>2022-05-24 19:52:49 +0200
committerlaanwj <126646+laanwj@users.noreply.github.com>2022-05-25 11:26:15 +0200
commitbd971bffb02c7b06aac9a479f7e5ed8f71de2bec (patch)
treeab24eb41471b950c57db65c3648e3c0c56a4a487 /src/dbwrapper.cpp
parent90e49c1ececd6296c6ec6109cea525a208c0626e (diff)
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.
Diffstat (limited to 'src/dbwrapper.cpp')
-rw-r--r--src/dbwrapper.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dbwrapper.cpp b/src/dbwrapper.cpp
index 50a601c684..83b59dc56d 100644
--- a/src/dbwrapper.cpp
+++ b/src/dbwrapper.cpp
@@ -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;