upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/main_gui.cpp
diff options
context:
space:
mode:
authorbitflash-maintainer <noreply@bitflash.invalid>2026-09-02 05:31:22 +0000
committerbitflash-maintainer <noreply@bitflash.invalid>2026-09-02 05:31:22 +0000
commit2661de141e46dadfb2903bb12e72dc87c5a64375 (patch)
tree73f5492187a1da4b362463834983ad767f105306 /src/main_gui.cpp
parentae1c6a7b49d9b4f8cf7218c0baec84f348eb5ef6 (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/main_gui.cpp')
-rw-r--r--src/main_gui.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp
index 05f5ecf..163d78e 100644
--- a/src/main_gui.cpp
+++ b/src/main_gui.cpp
@@ -111,6 +111,7 @@ static void PrintUsage()
111 printf(" /help, -help, --help, /?\n"); 111 printf(" /help, -help, --help, /?\n");
112 printf(" /datadir=PATH\n"); 112 printf(" /datadir=PATH\n");
113 printf(" /debug\n"); 113 printf(" /debug\n");
114 printf(" /debugrelay (/debug plus per-message relay chatter and block dumps)\n");
114 printf(" /maxdebugfilesize=N (roll debug.log at N MB, default 1024; 0 = never)\n"); 115 printf(" /maxdebugfilesize=N (roll debug.log at N MB, default 1024; 0 = never)\n");
115 printf(" /gen\n"); 116 printf(" /gen\n");
116 printf(" /nogui or /daemon\n"); 117 printf(" /nogui or /daemon\n");
@@ -192,6 +193,17 @@ static void ParseStartupArguments(int argc, char* argv[])
192 if (arg(argc,argv,"/debug") || arg(argc,argv,"-debug")) 193 if (arg(argc,argv,"/debug") || arg(argc,argv,"-debug"))
193 fDebug = true; 194 fDebug = true;
194 195
196 // /debugrelay -- everything /debug shows, plus the per-message firehose
197 // ("relay" and "nostrdiscovery" categories: sending: tx, Relaying wtx,
198 // raw CBlock dumps, per-peer discovery lines). That traffic was ~90% of
199 // a 13-hour production debug.log (issue #35), so plain /debug leaves it
200 // off; the message text itself is unchanged for anyone grepping it.
201 if (arg(argc,argv,"/debugrelay") || arg(argc,argv,"-debugrelay"))
202 {
203 fDebug = true;
204 fDebugRelay = true;
205 }
206
195 // /maxdebugfilesize=N -- roll debug.log to debug.log.old once it passes 207 // /maxdebugfilesize=N -- roll debug.log to debug.log.old once it passes
196 // N MB, checked on each write. Default is 1024 (see util.cpp); 0 turns 208 // N MB, checked on each write. Default is 1024 (see util.cpp); 0 turns
197 // the check off and leaves rotation entirely to logrotate. 209 // the check off and leaves rotation entirely to logrotate.