diff options
| author | bitflash-maintainer <noreply@bitflash.invalid> | 2026-09-02 05:31:22 +0000 |
|---|---|---|
| committer | bitflash-maintainer <noreply@bitflash.invalid> | 2026-09-02 05:31:22 +0000 |
| commit | 2661de141e46dadfb2903bb12e72dc87c5a64375 (patch) | |
| tree | 73f5492187a1da4b362463834983ad767f105306 /src/util.h | |
| parent | ae1c6a7b49d9b4f8cf7218c0baec84f348eb5ef6 (diff) | |
log: demote the four lines that were 90% of debug.log behind /debugrelay
A 13-hour production capture was ~71% "sending: tx", ~16% "Nostr:
discovered .btf peer", ~5% "Relaying wtx", and ~43% of raw lines were
CBlock/CTransaction dumps -- all already under -debug, which operators
run permanently, so -debug was useless as a filter.
The category mechanism gains a verbose tier: "relay" and
"nostrdiscovery" are accepted only with the new /debugrelay flag (which
implies /debug); everything else keeps its current gate. Demoted, with
message text unchanged for anyone grepping it:
net.h "sending: tx (N bytes)" (BeginMessage/EndMessage/
AbortMessage all pick the category from the command, so no
orphaned "(N bytes)" fragments leak into a plain -debug log)
main.cpp "Relaying wtx", "received block:" + CBlock::print, and the
BitcoinMiner block dump
nostr.cpp "Nostr: discovered .btf peer" -> "nostrdiscovery"
Pool/worker/payout, [payout], BLOCK ORPHANED/ACCEPTED and share flow
lines are untouched. Because LogPrint dedup keys on category, demoted
lines also keep their burst collapse under /debugrelay.
Closes #35
Diffstat (limited to 'src/util.h')
| -rw-r--r-- | src/util.h | 4 |
1 files changed, 4 insertions, 0 deletions
| @@ -87,6 +87,10 @@ inline T& REF(const T& val) | |||
| 87 | 87 | ||
| 88 | extern bool fDebug; | 88 | extern bool fDebug; |
| 89 | 89 | ||
| 90 | // /debugrelay: the per-message firehose ("relay" and "nostrdiscovery" | ||
| 91 | // categories) that even -debug keeps off. See LogAcceptsCategory(). | ||
| 92 | extern bool fDebugRelay; | ||
| 93 | |||
| 90 | // debug.log is rolled to debug.log.old once it grows past this many bytes | 94 | // debug.log is rolled to debug.log.old once it grows past this many bytes |
| 91 | // (set from -maxdebugfilesize, in MB; 0 disables the check). See the roll | 95 | // (set from -maxdebugfilesize, in MB; 0 disables the check). See the roll |
| 92 | // site in OutputDebugStringF() below. | 96 | // site in OutputDebugStringF() below. |