Mar 01 2021 06:33 AM - last edited on Nov 13 2023 12:08 PM by
Hi all!
We've used the Az CLI sometimes to view log streams from App Service web apps. This works ok-ish, like so:
az webapp log tail --name some-demo-app --resource-group some-demo-rg
But we're pretty stuck with how to filter the results. There's a ton of stuff streamed that we're not interested, so we'd like to just filter - as in grep or whatever - the results. The documentation (az webapp log | Microsoft Docs) is... lacking, to be polite: it mentions the "--query" parameter and has a link to JMespath website, but darned if I can figure out how to use it in this case.
I understand (well, sorta) how the JMespath stuff works on JSON objects, but the "webapp log tail" returns just simple strings. How can I filter on strings on the output strings? I feel like I'm trying to do something too simple here... ;)
Any ideas welcome!
Mar 01 2021 01:45 PM
Mar 01 2021 10:02 PM
Mar 22 2023 06:27 PM