Training
Module
Capture Web Application Logs with App Service Diagnostics Logging - Training
Learn about how to capture trace output from your Azure web apps. View a live log stream and download logs files for offline analysis.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
by Keith Newman and Robert McMurray
You can configure logging on your web server or website that records information about HTTP requests and errors. The information in your log can help you troubleshoot or optimize your website.
To get the most from this tutorial, you must have access to a computer that is running one of the following operating systems:
You can perform this procedure by using the user interface (UI), or by editing configuration files directly.
Open IIS Manager.
In the Connections tree view, select your website.
In Features View, double-click Logging.
On the Logging page, in the Log file section under Format, select one of the following log file formats:
Under Directory, specify the path where the log file should be stored. The default is %SystemDrive%\inetpub\logs\LogFiles
.
Note
As a best practice, store log files, such as failed request trace logs, in a directory other than %systemroot%
.
In the Log File Rollover section, select one of the following options:
Schedule: to create new log file that is based on one of the following values:
Maximum file size (in bytes): to create a log file when the file reaches a certain size (in bytes).The minimum file size is 1048576 bytes. If this attribute is set to a value less than 1048576 bytes, the default value is implicitly assumed as 1048576 bytes.
Do not create a new log file: there is a single log file that continues to grow as information is logged.
Select Use local time for file naming and rollover to specify that log file naming and time for log file rollover uses the local server time. When this option is not selected, Coordinated Universal Time (UTC) is used.
Note
Regardless of this setting, timestamps in the actual log file will use the time format for the log format that you select from the Format list. For example, NCSA and W3C log file formats use UTC time format for timestamps.
Click Apply in the Actions pane.
You can perform this procedure by using the user interface (UI), or by editing configuration files directly.
In the Connections tree view of IIS Manager, select your web server.
In Features View, double-click Logging.
On the Logging page under One log file per site, select Site from the drop-down list. By default, Site is selected.
On the Logging page, in the Log file section under Format, select one of the following log file formats:
Under Directory, specify the path where the log file should be stored. The default is %SystemDrive%\inetpub\logs\LogFiles
.
Note
As a best practice, store log files, such as failed request trace logs, in a directory other than %systemroot%
.
In the Log File Rollover section, select one of the following options:
Schedule: to create new log file that is based on one of the following values:
Maximum file size (in bytes): to create a log file when the file reaches a certain size (in bytes).The minimum file size is 1048576 bytes. If this attribute is set to a value less than 1048576 bytes, the default value is implicitly assumed as 1048576 bytes.
Do not create a new log file: there is a single log file that continues to grow as information is logged.
Select Use local time for file naming and rollover to specify that log file naming and time for log file rollover uses the local server time. When this option is not selected, Coordinated Universal Time (UTC) is used.
Note
Regardless of this setting, timestamps in the actual log file will use the time format for the log format that you select from the Format list. For example, NCSA and W3C log file formats use UTC time format for timestamps.
Click Apply in the Actions pane.
You can perform this procedure by using the user interface (UI), or by editing configuration files directly.
In the Connections tree view of IIS Manager, select your web server.
In Features View, double-click Logging.
On the Logging page, under One log file per site, select Server from the drop-down list. By default, Site is selected.
On the Logging page, in the Log file section under Format, select one of the following log file formats:
Under Directory, specify the path where the log file should be stored. The default is %SystemDrive%\inetpub\logs\LogFiles
.
Note
As a best practice, store log files, such as failed request trace logs, in a directory other than %systemroot%
.
In the Log File Rollover section, select one of the following options:
Schedule: to create new log file that is based on one of the following values:
Maximum file size (in bytes): to create a log file when the file reaches a certain size (in bytes).The minimum file size is 1048576 bytes. If this attribute is set to a value less than 1048576 bytes, the default value is implicitly assumed as 1048576 bytes.
Do not create a new log file: there is a single log file that continues to grow as information is logged.
Select Use local time for file naming and rollover to specify that log file naming and time for log file rollover uses the local server time. When this option is not selected, Coordinated Universal Time (UTC) is used.
Note
Regardless of this setting, timestamps in the actual log file will use the time format for the log format that you select from the Format list. For example, NCSA and W3C log file formats use UTC time format for timestamps.
Click Apply in the Actions pane.
You can perform this procedure by using the user interface (UI), or by editing configuration files directly.
In Features View of IIS Manager, double-click Logging.
On the Logging page, in the Log file section under Format, click Select Fields.
In the W3C Logging Fields dialog box, select one or more of the following options:
Click Apply in the Actions pane.
You can perform this procedure by using the user interface (UI), or by editing configuration files directly.
In Features View of IIS Manager, double-click Logging.
On the Logging page, in the Log File Rollover section, select one of the following options:
Schedule: to create new log file that is based on one of the following values:
Maximum file size (in bytes): to create a log file when the file reaches a certain size (in bytes).The minimum file size is 1048576 bytes. If this attribute is set to a value less than 1048576 bytes, the default value is implicitly assumed as 1048576 bytes.
Do not create a new log file: This option means that there is a single log file that continues to grow as information is logged. If you use a single log file for your site, it is helpful when you use log parsing utilities, but it also creates larger log files that could affect the overall performance of the server.
Select Use local time for file naming and rollover to specify that log file naming and time for log file rollover uses the local server time. When this option is not selected, Coordinated Universal Time (UTC) is used.
Note
Regardless of this setting, timestamps in the actual log file will use the time format for the log format that you select from the Format list. For example, NCSA and W3C log file formats use UTC time format for timestamps.
Click Apply in the Actions pane.
Training
Module
Capture Web Application Logs with App Service Diagnostics Logging - Training
Learn about how to capture trace output from your Azure web apps. View a live log stream and download logs files for offline analysis.