-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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 incompatible command-line args an error #35570
Conversation
Signed-off-by: Raven Black <[email protected]>
Signed-off-by: Raven Black <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the improvement!
Could you also add a change-log for this change?
/wait
source/server/options_impl.cc
Outdated
enable_fine_grain_logging_ = enable_fine_grain_logging.getValue(); | ||
if (enable_fine_grain_logging_ && !component_log_level.getValue().empty()) { | ||
throw MalformedArgvException( | ||
std::string{"error: --component-log-level will not work with --enable-fine-grain-logging"}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: std::string can be removed?
Signed-off-by: Raven Black <[email protected]>
Signed-off-by: Raven Black <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks!
May need a second pass from other folks.
/assgin-from @envoyproxy/senior-maintainers |
/assign-from @envoyproxy/senior-maintainers |
@envoyproxy/senior-maintainers assignee is @mattklein123 |
Commit Message: Make incompatible command-line args an error Additional Description: Per envoyproxy#35073, `--enable-fine-grain-logging` and `--component-log-level` don't make sense at the same time, one of them will be overridden by the other in a way that can be surprising for the user. This PR makes it an error to apply both, so the user is not surprised by not getting the logs they expected at runtime. Risk Level: Small. May make existing command-lines with ineffective options fail. Testing: Added coverage. Docs Changes: Updated command-line options docs. Release Notes: Yes, under minor behavior changes. Platform Specific Features: n/a --------- Signed-off-by: Raven Black <[email protected]> Signed-off-by: Martin Duke <[email protected]>
Commit Message: Make incompatible command-line args an error Additional Description: Per envoyproxy#35073, `--enable-fine-grain-logging` and `--component-log-level` don't make sense at the same time, one of them will be overridden by the other in a way that can be surprising for the user. This PR makes it an error to apply both, so the user is not surprised by not getting the logs they expected at runtime. Risk Level: Small. May make existing command-lines with ineffective options fail. Testing: Added coverage. Docs Changes: Updated command-line options docs. Release Notes: Yes, under minor behavior changes. Platform Specific Features: n/a --------- Signed-off-by: Raven Black <[email protected]> Signed-off-by: asingh-g <[email protected]>
Commit Message: Make incompatible command-line args an error
Additional Description: Per #35073,
--enable-fine-grain-logging
and--component-log-level
don't make sense at the same time, one of them will be overridden by the other in a way that can be surprising for the user. This PR makes it an error to apply both, so the user is not surprised by not getting the logs they expected at runtime.Risk Level: Small. May make existing command-lines with ineffective options fail.
Testing: Added coverage.
Docs Changes: Updated command-line options docs.
Release Notes: Yes, under minor behavior changes.
Platform Specific Features: n/a