Skip to content
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

Merged
merged 1 commit into from
Aug 1, 2012

Conversation

rebroad
Copy link
Contributor

@rebroad rebroad commented May 29, 2012

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.

@@ -410,7 +411,7 @@ bool AppInit2()
}
#endif

if (!fDebug)
if (GetBoolArg("-shrinkdebugfile", true))
Copy link
Member

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" +

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@sipa
Copy link
Member

sipa commented Jun 12, 2012

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" +
Copy link

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 ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would you prefer?

Copy link

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.

Copy link
Contributor Author

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)?

Copy link

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.

@jgarzik
Copy link
Contributor

jgarzik commented Jun 27, 2012

ACK

@Diapolo
Copy link

Diapolo commented Jun 27, 2012

I still dislike the parameter description.

@rebroad
Copy link
Contributor Author

rebroad commented Jun 27, 2012

@Diapolo what do you suggest for the parameter description? I changed it to that as per @luke-jr's suggestion.

@Diapolo
Copy link

Diapolo commented Jun 27, 2012

I 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 ;).

@rebroad
Copy link
Contributor Author

rebroad commented Jun 27, 2012

@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.
@rebroad
Copy link
Contributor Author

rebroad commented Jun 27, 2012

@Diapolo amended as per your suggestion.

jgarzik pushed a commit that referenced this pull request Aug 1, 2012
Make truncating the debug.log file an option.
@jgarzik jgarzik merged commit b5029b8 into bitcoin:master Aug 1, 2012
lateminer pushed a commit to lateminer/bitcoin that referenced this pull request May 6, 2020
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
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants