aws / aws-nitro-enclaves-cli

Tooling for Nitro Enclave Management
Apache License 2.0
116 stars 78 forks source link

Allow opt out of json pretty print in `enclave_process_handle_all_replies` #544

Open emostov opened 9 months ago

emostov commented 9 months ago

Issue #, if available:

I did not find an issue for this, but I can create one if necessary. The only marginally related issue I saw is #483.

Description of changes:

Currently, all json is pretty printed. For ease of log ingestion/monitoring, this should be a single (unprettified) json line; specifically there should be no new line characters or superfluous indentation.

The change introduced here should not change api of the CLI itself, but instead just introduce the optionality to do non-pretty print for crate users. This change is done by adding a fifth boolean argument to enclave_process_handle_all_replies, which is used to indicate wether or not to pretty print the json. For crate users who want to maintain the status quo, they can simply set this argument to true.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.