-
Notifications
You must be signed in to change notification settings - Fork 35.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make truncating the debug.log file an option. #1396
Conversation
@@ -410,7 +411,7 @@ bool AppInit2() | |||
} | |||
#endif | |||
|
|||
if (!fDebug) | |||
if (GetBoolArg("-shrinkdebugfile", true)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about this?
if (GetBoolArg("-shrinkdebugfile", !fDebug))
Don't forget docs:
" -shrinkdebugfile " + _("Keep debug.log file small (default: opposite of -debug)") + "\n" +
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would certainly make it closer to the previous behavior Happy to change this unless anyone objects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Not sure this is needed, but ACK on the code change. |
@@ -243,6 +243,7 @@ bool static Bind(const CService &addr, bool fError = true) { | |||
" -testnet " + _("Use the test network") + "\n" + | |||
" -debug " + _("Output extra debugging information") + "\n" + | |||
" -logtimestamps " + _("Prepend debug output with timestamp") + "\n" + | |||
" -shrinkdebugfile " + _("Keep debug.log file small (default: opposite of -debug)") + "\n" + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if that is a nice string and understandable by users ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would you prefer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps Keep debug.log file size below 10MB (default: opposite of -debug)
.
I just think "small" is too general.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
ACK |
I still dislike the parameter description. |
I think the parameter name should somehow match the description, so I propose |
@Diapolo amended as per your suggestion. |
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.
@Diapolo amended as per your suggestion. |
Make truncating the debug.log file an option.
70e009f [GUI] Improving topbar MNs sync status text. (furszy) Pull request description: Straightforward change, adding the masternodes sync phase status to the topbar sync text. ACKs for top commit: random-zebra: utACK 70e009f Fuzzbawls: utACK 70e009f Tree-SHA512: 1b79d645ae74e3bcffea990f9a7d32c31ec1bb755f1844720717fd5e1bf0418da85f4585ec9a67b73a7debdfb1896cf8163d1eceffca30d110ccb5ff452ba530
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.