-
Notifications
You must be signed in to change notification settings - Fork 970
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
Configuration cleanup #1893
Merged
Merged
Configuration cleanup #1893
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This should have been cleaned up in adaedc9.
The configuration objects already now how to convert themselves to and from strings. Use that existing code, rather than poorly duplicate it.
All parameters can be converted to and from strings, so this is a reasonable default for most settings. We don't need to bail out for complex types.
This allows smooth upgrades for users if the defaults change in the future.
We don't consistently use these, so they are just confusing. Instead, we rely on the linker to not include unnecessary objects, and hence irrelevant configuration objects.
Avoid rolling our own linked list when we have the standard library.
Now that we are based on a normal std::list, we can use normal iterators to go through the parameters.
This is a "parameter", not an "option", so let's make sure it's in the correct section.
The latter is the legacy alias, so prefer the former in the documentation.
Makes it much easier to find all the different options.
It's possible to configure multiple loggers with different settings. This was properly described in the --help output, but not the man pages.
This is more in line with our other tools, and keeps all the X options together in the usage output.
This is a lot more readable than "0"/"1", which can easily be confused with integer parameters. Note that this breaks some backwards compatibility. Older clients will not be able to parse configuration files generated by newer clients, as they had a bug where they could only understand "0" and "1".
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This cleans up some code, but the primary feature is that the man pages and
--help
are easier to read.