Useful for developers who need to refer to futher back in debug.log history, but who don't want to enable the -debug option and all the verbosity that comes with that.
Make truncating the debug.log file an option. #1396
pull rebroad wants to merge 1 commits into bitcoin:master from rebroad:NoShrinkOption changing 1 files +2 −1-
rebroad commented at 4:15 PM on May 29, 2012: contributor
-
in src/init.cpp:None in 5e4e0f8cbe outdated
410 | @@ -410,7 +411,7 @@ bool AppInit2() 411 | } 412 | #endif 413 | 414 | - if (!fDebug) 415 | + if (GetBoolArg("-shrinkdebugfile", true))
luke-jr commented at 8:21 PM on May 30, 2012:How about this?
if (GetBoolArg("-shrinkdebugfile", !fDebug))Don't forget docs:
" -shrinkdebugfile " + _("Keep debug.log file small (default: opposite of -debug)") + "\n" +
rebroad commented at 1:30 AM on May 31, 2012:That would certainly make it closer to the previous behavior Happy to change this unless anyone objects.
rebroad commented at 9:33 AM on May 31, 2012:Done
sipa commented at 8:00 PM on June 12, 2012: memberNot sure this is needed, but ACK on the code change.
in src/init.cpp:None in e3eeffabae outdated
242 | @@ -243,6 +243,7 @@ bool static Bind(const CService &addr, bool fError = true) { 243 | " -testnet " + _("Use the test network") + "\n" + 244 | " -debug " + _("Output extra debugging information") + "\n" + 245 | " -logtimestamps " + _("Prepend debug output with timestamp") + "\n" + 246 | + " -shrinkdebugfile " + _("Keep debug.log file small (default: opposite of -debug)") + "\n" +
Diapolo commented at 8:44 PM on June 12, 2012:I'm not sure if that is a nice string and understandable by users ...
rebroad commented at 11:06 PM on June 14, 2012:What would you prefer?
Diapolo commented at 4:58 AM on June 15, 2012:Perhaps
Keep debug.log file size below 10MB (default: opposite of -debug). I just think "small" is too general.
rebroad commented at 8:23 AM on June 15, 2012:I think 10MB is too specific. Perhaps instead of a flag on whether to shrink or not, perhaps a flag on what size to shrink at (with zero meaning never shrink)?
Diapolo commented at 9:35 AM on June 15, 2012:So more like -maxdebuglogsize, which can be set to 0 (not limited) or or to a certain value that sets the limit, when reached, debug.log gets shrunken. I like this idea, if you would keep a default value > 0.
jgarzik commented at 2:53 PM on June 27, 2012: contributorACK
Diapolo commented at 4:09 PM on June 27, 2012: noneI still dislike the parameter description.
Diapolo commented at 9:46 PM on June 27, 2012: noneI think the parameter name should somehow match the description, so I propose
Shrink debug.log file on client startup (default: 1 when no -debug), which uses a similar wording like -discover in the brackets. If you don't like that just keep it, I guess there are more important problems to discuss ;).7f1de3fec8Make truncating the debug.log file an option.
Useful for developers who need to refer to futher back in debug.log history, but who don't want to enable the -debug option and all the verbosity that comes with that.
jgarzik referenced this in commit b5029b87c8 on Aug 1, 2012jgarzik merged this on Aug 1, 2012jgarzik closed this on Aug 1, 2012lateminer referenced this in commit b56172a01b on May 6, 2020DrahtBot locked this on Sep 8, 2021
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 18:16 UTC
More mirrored repositories can be found on mirror.b10c.me