Explicitly set verbosity from cxxopts value. #542
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.
While investigating #541, I ran
et
with--verbose=9
but realized that the logs created byet
andetterminal
were not verbose. It turns out that the default argv parsing that easyloggingpp does via START_EASYLOGGINGPP(argc, argv) does not mesh well with the cxxopts style options so instead of relying on the default handling of argv/argc in ELPP, let's just explicitly set the verbose level from the cxxopts option argument. Note that a value greater than 9 defaults to 9 in ELPP so no handling in et/etterminal/etserver is required.Examples of the discrepancies:
et --verbose=5
(cxxopts 5, ELPP 0)--verbose
(I have PR out for this)et --verbose 5
(cxxopts 5, ELPP 9)et -v 5
(cxxopts 5, ELPP 9)et --v=5
(cxxopts exception, ELPP 5)'long' opt of
v