Silencing "Please let us know how we are doing.." from the STDOUT of az commands
Hello ,
i would like to silence/remove the info msg popping up each time when executing a az cli command
Please let us know how we are doing: https://aka.ms/azureclihats
and let us know if you're interested in trying out our newest features: https://aka.ms/CLIUXstudy
tried all available options with setting the config core output to print only errors , but nothing works. Is there any specific workaround for this case ?
TIA
@jiasli for awareness
I would like to do this: AZCLI=$(az --version|grep azure-cli) echo "$AZCLI" and get azure-cli 2.37.0 with out the extra crap. If I wanted the extra, I would be fine entering az --version --verbose.
The recommended why to get the version for automation is using az version which shows versions in JSON:
> az version
{
"azure-cli": "2.37.0",
"azure-cli-core": "2.37.0",
"azure-cli-telemetry": "1.0.6",
"extensions": {
"ssh": "1.1.1"
}
}
There is indeed a switch to turn the survey links off:
https://github.com/Azure/azure-cli/blob/0d71b506a3242c51e6153c0b1eead64b7e698174/src/azure-cli-core/azure/cli/core/init.py#L127
https://github.com/Azure/azure-cli/blob/8264073bbec8424fc7329c5587c61725ef619880/src/azure-cli-core/azure/cli/core/_help.py#L174
We definitely should document it at https://docs.microsoft.com/en-us/cli/azure/azure-cli-configuration.
Thank you for your feedback. This has been routed to the support team for assistance.
There is indeed a switch to turn the survey links off:
https://github.com/Azure/azure-cli/blob/0d71b506a3242c51e6153c0b1eead64b7e698174/src/azure-cli-core/azure/cli/core/init.py#L127
https://github.com/Azure/azure-cli/blob/8264073bbec8424fc7329c5587c61725ef619880/src/azure-cli-core/azure/cli/core/_help.py#L174
We definitely should document it at https://docs.microsoft.com/en-us/cli/azure/azure-cli-configuration.
FYI:
az config set output.show_survey_link=no
or
vi ~/.azure/config
[output]
show_survey_link = no
or
export AZURE_OUTPUT_SHOW_SURVEY_LINK=false
@Nilubkal Apologies for the late reply. Thanks for reaching out to us and sharing this feedback. I just wanted to reconfirm if you have checked the above suggestions. Awaiting your reply.
@Nilubkal I wanted to do quick follow-up to check if you had a chance to check the above suggestions and test. Please let us know if you need any further assistance on this. Awaiting your reply.
Yes, it seems that the suggested solution works. This should be added tot the official documentation of az cli.
Thanks !
@Nilubkal Thanks for getting back. The above PR has been filed to fix our documentation to include this command. Currently it is under review. In the meantime, if you have any questions, feel free to ask.