From ab34dc6012351e7b8aab871dd9d2b38ade1cd9bc Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Wed, 23 Aug 2023 10:02:03 +1000 Subject: [PATCH] logging: Log Info messages unconditionally Previously Info-level logging when a category was specified (via LogPrintLevel) would only print the corresponding log message if `-debug=category` were specified, while Info-level logging without a category would always be printed. Make this more consistent by having Info messages always be logged, whether they include a category or not. --- src/logging.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/logging.cpp b/src/logging.cpp index b23a6f96eba..d516cd65a51 100644 --- a/src/logging.cpp +++ b/src/logging.cpp @@ -126,9 +126,9 @@ bool BCLog::Logger::WillLogCategory(BCLog::LogFlags category) const bool BCLog::Logger::WillLogCategoryLevel(BCLog::LogFlags category, BCLog::Level level) const { - // Log messages at Warning and Error level unconditionally, so that + // Log messages at Info, Warning and Error level unconditionally, so that // important troubleshooting information doesn't get lost. - if (level >= BCLog::Level::Warning) return true; + if (level >= BCLog::Level::Info) return true; if (!WillLogCategory(category)) return false;