1

可以使用PowerShell啓用Web應用程序中的應用程序日誌記錄功能嗎?使用PowerShell在Web應用程序中啓用應用程序日誌記錄

目前,我運行這些命令來啓用其他設置,但我無法弄清楚如何啓用應用程序日誌(文件系統)設置。

Set-AzureRmWebApp -ResourceGroupName "habdol" -DetailedErrorLoggingEnabled $true -HttpLoggingEnabled $true -RequestTracingEnabled $true 

回答

0

使用Enable-AzureWebsiteapplicationDiagnostic cmdlet。例如,要在警告級別設置應用程序登錄(文件系統),請執行下列操作:

Enable-AzureWebsiteApplicationDiagnostic -Name $webAppName -File -LogLevel Warning 

注意,沒有這個的「AzureRM」等價cmdlet的。至少不是我見過的。

另外,請記住,當您啓用應用程序日誌記錄到文件系統時,它將在12小時後自動禁用。

+0

我正在使用AzureRM cmdlet,因此我無法做到這一點。 – Hubabalo

+0

它仍然有效。試試看。 –

相關問題