azuredemoenvironment / ade

Azure Demo Environment
MIT License
34 stars 11 forks source link

Hide AZ stderr Output and Move to Powershell Exception Stack #218

Open brandonmartinez opened 2 years ago

brandonmartinez commented 2 years ago

When az is running, it can get pretty chatty with warnings and errors. Instead, disable the current stderr output and route that into powershell; if there's an error, throw the error and let Powershell handle it.

Need to set AZURE_CORE_ONLY_SHOW_ERRORS to disable warnings from getting logged, and then route errors somewhere else using 2>$something: https://learn.microsoft.com/en-us/cli/azure/azure-cli-configuration

This should also be made configurable so that during development they can still be seen, but during a normal run it's hidden.

brandonmartinez commented 2 years ago

For example, this is way too noisy:

image

And ideally, that JSON output has literal escapes in it (all of the \r \n and \\ in the JSON output) that could be cleaned up and displayed properly for debug purposes.