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

config: Add logsize config option. #2711

Merged
merged 1 commit into from
Aug 27, 2021
Merged

config: Add logsize config option. #2711

merged 1 commit into from
Aug 27, 2021

Conversation

jrick
Copy link
Member

@jrick jrick commented Aug 16, 2021

The logsize option enables configuration of the currently-hardcoded
value of 10MB log files before they are rotated and compressed. The
default remains 10MB.

This is a string option and requires using a suffix such as KB, MB, or
GB to specify the units as kibibytes, mebibytes, or gibibytes.

Copy link
Member

@matheusd matheusd left a comment

Choose a reason for hiding this comment

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

Tested fine, but needs an update to sampleconfig.go to list the new option.

config.go Outdated Show resolved Hide resolved
@jrick
Copy link
Member Author

jrick commented Aug 23, 2021

yeah, i had mentioned that to @davecgh in another chat. there's already no option for the logdir, so i wasn't sure if we cared to include that and/or this. probably makes the most sense to hit them both up in a later PR if we do want them.

@jholdstock
Copy link
Member

Is it really worth adding the extra code to support handling this as a string? Especially considering all of that code is duplicated across dcrd and dcrwallet?

I added this same functionality in decred/vspd#249 and just made the param an integer which is always measured in MB.

@jrick
Copy link
Member Author

jrick commented Aug 23, 2021

When people want their logs to grow to the gigabytes, yes...

@jholdstock
Copy link
Member

If somebody wants 2GB they can simply set logsize=2000

@jrick
Copy link
Member Author

jrick commented Aug 23, 2021

2048, actually.

config.go Outdated Show resolved Hide resolved
config.go Outdated Show resolved Hide resolved
The logsize option enables configuration of the currently-hardcoded
value of 10MiB log files before they are rotated and compressed. The
default remains 10MiB.

This is a string option and requires using a suffix such as K, M, or
G to specify the units as kibibytes, mebibytes, or gibibytes.
@davecgh davecgh merged commit b4861dd into decred:master Aug 27, 2021
@jrick jrick deleted the logsize branch August 27, 2021 14:06
@jrick jrick restored the logsize branch August 27, 2021 14:14
@jrick jrick deleted the logsize branch August 27, 2021 14:14
@jrick jrick restored the logsize branch August 27, 2021 14:18
@jrick jrick deleted the logsize branch August 27, 2021 14:18
@jrick jrick restored the logsize branch August 27, 2021 14:18
@jrick jrick deleted the logsize branch August 27, 2021 14:18
@jrick jrick restored the logsize branch August 27, 2021 14:20
@jrick jrick deleted the logsize branch August 27, 2021 14:20
@jrick jrick restored the logsize branch August 28, 2021 16:37
@jrick jrick deleted the logsize branch August 28, 2021 16:38
@jrick jrick restored the logsize branch August 28, 2021 16:41
@jrick jrick deleted the logsize branch August 28, 2021 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants