extra flag parameter for storage-cli and logging stderr log stream #4795
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.
Context
We introduced log-level support in
storage-cliand, by default, route all log output to thestderrstream. On thecloud_controller_ngside, these logs need to be persisted to support troubleshooting or debugging.In addition,
storage-clinow exposes optional flags (e.g.-log-level,-log-file) that must be configurable and passed through fromcloud_controller.Solution
We implemented log-level–aware logging in
cloud_controller_ngand ensured that all relevant output is written tocloud_controller_ng.log.To support flexible configuration, we introduced a new config variable,
storage_cli_optional_flags, which allows arbitrary extra flags to be forwarded directly tostorage-cli.The variable is defined as a single string containing the desired flags, for example:
Links to any other associated PRs
I have reviewed the contributing guide
I have viewed, signed, and submitted the Contributor License Agreement
I have made this pull request to the
mainbranchI have run all the unit tests using
bundle exec rakeI have run CF Acceptance Tests