Skip to content

Commit ab34dc6

Browse files
committed
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.
1 parent dfe98b6 commit ab34dc6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/logging.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ bool BCLog::Logger::WillLogCategory(BCLog::LogFlags category) const
126126

127127
bool BCLog::Logger::WillLogCategoryLevel(BCLog::LogFlags category, BCLog::Level level) const
128128
{
129-
// Log messages at Warning and Error level unconditionally, so that
129+
// Log messages at Info, Warning and Error level unconditionally, so that
130130
// important troubleshooting information doesn't get lost.
131-
if (level >= BCLog::Level::Warning) return true;
131+
if (level >= BCLog::Level::Info) return true;
132132

133133
if (!WillLogCategory(category)) return false;
134134

0 commit comments

Comments
 (0)