Process plog severity correctly from CLI11 flag #292
Merged
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.
Type
Side Effects
Goals
Technical Details
CLI11 flag arguments, when bound to a variable of integral type, count the number of times the flag is specified. It was previously assumed that if the bound variable had a pre-seeded value (as we had done), that not specifying the flag would preserve the pre-seeded value. However, this is not the case and the value is reset to 0 to reflect the flag was not specified. This caused the default log level to have the value 0, which corresponds with the 'fatal' plog severity instead of the intended 'info' log severity. The following changes were made to fix this issue:
NetRemoteServerConfiguration
for consistent usage across the codebase.netremote-server
log verbosity flag (-v
) default value to the newly introduced default ('info'
).NetRemoteServerConfiguration::LogVerbosity
to the newly introduced default ('info'
).NetRemoteServerConfiguration::LogVerbosity
field comment.LogVerbosityToPlogSeverity
helper to prevent use ofplog::none
which will prevent any messages from being printed. There should never be any real use for this.netremote-server
was configured with when it starts up.Test Results
-vvvvv
and validated the log level was configured to be 'verbose' and verbose messages appeared in the console output (green output indicates verbose log level):Reviewer Focus
Future Work
Checklist
all
compiles cleanly.