AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 17 Bitcoin

log: clean up LogPrintStr_ and Reset, prefix all logs with "[*]" when there are suppressions

Public commit record

What the developer wrote

Authored by Eugene Siegel

73/100 · Adequate
log: clean up LogPrintStr_ and Reset, prefix all logs with "[*]" when there are suppressions

In LogPrintStr_:
- remove an unnecessary BCLog since we are in the BCLog namespace.
- remove an unnecessary \n when rate limiting is triggered since
FormatLogStrInPlace will add it.
- move the ratelimit bool into an else if block.
- prefix all log lines with [*] when suppressions exist. Previously this
was only done if should_ratelimit was true.

In Reset:
- remove an unnecessary \n since FormatLogStrInPlace will add it.
- Change Level::Info to Level::Warning.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This is a small cleanup change to Bitcoin Core's internal logging code. It fixes a minor bug where a '[*]' indicator that warns operators some log messages are being suppressed was only shown in one specific case, and now shows it whenever any suppression is active. It also removes a few redundant newline characters and adjusts a log message severity from 'Info' to 'Warning'. There is no direct security vulnerability here; it is a reliability/usability improvement for log output.

Recommended action

No security action required. Treat as a normal code-quality/logging improvement. Reviewers may want to confirm the removed '\n' characters do not affect downstream log consumers that expect explicit newlines, though FormatLogStrInPlace is documented to add them.

Security signals we found

01

Logging-only change with no input parsing, network, or cryptographic code modified

02

No change to consensus, validation, wallet, or P2P logic

03

Severity raised from Info to Warning for dropped-bytes notification (improved operator visibility)

04

Indicator prefix now correctly shown whenever log suppression is active

Risk score

Why this scored 17/100

Our methodology →
Potential impact 2/30
Exploitability 0/25
Stealth signal 1/15
Affected reach 2/15
Confidence 8/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.