Skip to content

Commit 47fea21

Browse files
authored
Merge pull request #8433 from stewartadam/webapp-python-showerror
Better discoverability for Python application error troubleshooting
2 parents cb24fdf + 21f7657 commit 47fea21

File tree

3 files changed

+27
-10
lines changed

3 files changed

+27
-10
lines changed

articles/app-service/app-service-web-open-source-technologies-faq.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,7 @@ To turn on PHP logging:
6464
For more information, see [Enable WordPress error logs](https://blogs.msdn.microsoft.com/azureossds/2015/10/09/logging-php-errors-in-wordpress-2/).
6565

6666
## How do I log Python application errors in apps that are hosted in App Service?
67-
68-
To capture Python application errors:
69-
70-
1. In the Azure portal, in your web app, select **Settings**.
71-
2. On the **Settings** tab, select **Application settings**.
72-
3. Under **App settings**, enter the following key/value pair:
73-
* Key : WSGI_LOG
74-
* Value : D:\home\site\wwwroot\logs.txt (enter your choice of file name)
75-
76-
You should now see errors in the logs.txt file in the wwwroot folder.
67+
[!INCLUDE [web-sites-python-troubleshooting-wsgi-error-log](../../includes/web-sites-python-troubleshooting-wsgi-error-log.md)]
7768

7869
## How do I change the version of the Node.js application that is hosted in App Service?
7970

articles/app-service/web-sites-python-configure.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,9 @@ Contents of `ptvs_virtualenv_proxy.py`:
346346
## Troubleshooting - Virtual Environment
347347
[!INCLUDE [web-sites-python-troubleshooting-virtual-environment](../../includes/web-sites-python-troubleshooting-virtual-environment.md)]
348348

349+
## Troubleshooting - Startup Errors
350+
[!INCLUDE [web-sites-python-troubleshooting-wsgi-error-log](../../includes/web-sites-python-troubleshooting-wsgi-error-log.md)]
351+
349352
## Next steps
350353
For more information, see the [Python Developer Center](/develop/python/).
351354

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: include file
3+
description: include file
4+
services: app-service
5+
author: cephalin
6+
ms.service: app-service
7+
ms.topic: include
8+
ms.date: 06/11/2018
9+
ms.author: cephalin
10+
ms.custom: include file
11+
---
12+
13+
If Python encounters an error while starting your application, only a simple error page will be returned (e.g. "The page cannot be displayed because an internal server error has occurred.").
14+
15+
To capture Python application errors:
16+
17+
1. In the Azure portal, in your web app, select **Settings**.
18+
2. On the **Settings** tab, select **Application settings**.
19+
3. Under **App settings**, enter the following key/value pair:
20+
* Key : WSGI_LOG
21+
* Value : D:\home\site\wwwroot\logs.txt (enter your choice of file name)
22+
23+
You should now see errors in the logs.txt file in the wwwroot folder.

0 commit comments

Comments
 (0)