You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: learn-pr/wwl-azure/configure-web-app-settings/includes/5-enable-diagnostic-logging.md
+26-6Lines changed: 26 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ The following table shows the types of logging, the platforms supported, and whe
12
12
13
13
## Enable application logging (Windows)
14
14
15
-
1. To enable application logging for Windows apps in the Azure portal, navigate to your app and select **App Service logs**.
15
+
1. To enable application logging for Windows apps in the Azure portal, navigate to your app and select **Monitoring** > **App Service logs**.
16
16
17
17
1. Select **On** for either **Application Logging (Filesystem)** or **Application Logging (Blob)**, or both. The **Filesystem** option is for temporary debugging purposes, and turns itself off in 12 hours. The **Blob** option is for long-term logging, and needs a blob storage container to write logs to.
18
18
@@ -57,25 +57,42 @@ In your application code, you use the usual logging facilities to send log messa
57
57
System.Diagnostics.Trace.TraceError("If you're seeing this, something bad happened");
>Sometypesofloggingbufferwritetothelogfile, whichcanresultinoutofordereventsinthestream. Forexample, anapplicationlogentrythatoccurswhenauservisitsapagemaybedisplayedinthestreambeforethecorrespondingHTTPlogentryfor the page request.
70
81
71
82
* Azure portal - To stream logs in the Azure portal, navigate to your app and select **Log stream**.
72
83
73
-
* Azure CLI - To stream logs live in Cloud Shell, use the following command:
84
+
* Azure CLI - To stream logs live in Cloud Shell, use the following command (note:CloudShellmaynotworkforsomeLinux-basedplans; usethelocalCLIifneeded):
Tofilterspecificlogtypes, suchasHTTPorapplicationlogs, usethe `--provider` parameter, for example:
91
+
92
+
```bash
93
+
az webapp log tail --name appname --resource-group myResourceGroup --provider http
94
+
```
95
+
79
96
* Local console - To stream logs in the local console, install Azure CLI and sign in to your account. Once signed in, follow the instructions shown for Azure CLI.
80
97
81
98
## Access log files
@@ -85,7 +102,10 @@ If you configure the Azure Storage blobs option for a log type, you need a clien
85
102
For logs stored in the App Service file system, the easiest way is to download the ZIP file in the browser at:
* Windows apps: `https://<app-name>.scm.azurewebsites.net/api/dump`
105
+
* Windows apps: `https://<app-name>.scm.azurewebsites.net/api/logs/zip`
106
+
107
+
> [!NOTE]
108
+
> The `api/dump` endpoint downloads a full diagnostic dump, not just logs. Use `api/logs/zip` to download only log files.
89
109
90
110
For Linux/container apps, the ZIP file contains console output logs for both the docker host and the docker container. For a scaled-out app, the ZIP file contains one set of logs for each instance. In the App Service file system, these log files are the contents of the */home/LogFiles* directory.
0 commit comments