【问题标题】:Enable Azure diagnostics logging using a CLI使用 CLI 启用 Azure 诊断日志记录
【发布时间】:2017-06-13 05:57:43
【问题描述】:
我正在尝试实现this,但是我想使用任何可能的非人类交互形式来启用诊断日志记录。我想在我的构建步骤中加入一些启用诊断日志记录的东西,默认情况下这些似乎是关闭的。有任何可用的 Powsershell(使用 Azure RM)或 Visual Studio Team Service 构建任务来实现这一点?
【问题讨论】:
标签:
azure
azure-web-app-service
azure-diagnostics
azure-cli
【解决方案1】:
您可以使用Azure CLI 2.0 来实现。您可以使用以下命令。
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}]
从 az help 命令 az webapp log config -h 或 official article 获取帮助。
#an example
az webapp log config --name shui -g shuiapp --application-logging true --web-server-logging filesystem