Enable Azure diagnostics logging using a CLI
Asked Answered
P

1

7

I am trying to achieve achieve this, however I would like to enable diagnostics logging using whatever form of non-human interaction possible. I would like to incorporate something that enables diagnostics logging during my build step, by default these are turned off it seems. Any Powsershell (using Azure RM) or visual studio team service build tasks available to make this happen?

Pearce answered 13/6, 2017 at 5:57 Comment(0)
K
4

You could do it with Azure CLI 2.0. You could use the following command.

az webapp log config --name
                     --resource-group
                     [--application-logging {false, true}]
                     [--detailed-error-messages {false, true}]
                     [--failed-request-tracing {false, true}]
                     [--level {error, information, verbose, warning}]
                     [--slot]
                     [--web-server-logging {filesystem, off, storage}]

Get help from az help command az webapp log config -h or the official article.

#an example
az webapp log config --name shui -g shuiapp --application-logging true --web-server-logging filesystem
Kwang answered 13/6, 2017 at 6:10 Comment(1)
Thanks will give it a look through now :)Pearce

© 2022 - 2024 — McMap. All rights reserved.