windows server 2016

How to configure, view and change IIS Log location on Windows Server 2016

Web server IIS 10.0 (Internet Information Services) on Windows Server 2016, as in previous versions, supports storing of HTTP requests and error logs for the sites running on it. IIS log files allow you to simplify the debugging, troubleshooting and optimizing your web sites and applications.

You can configure logging both on Per-server or Per-site level. To configure IIS logging on server level, open Internet Information Services (IIS) Manager console, choose server name and select Logging option in the right pane.

IIS dc home logging

Note. The Logging option will be available only if IIS: HTTP Logging feature is installed (Web Server -> Health and Diagnostics -> HTTP Logging).

IIS server roles diagnostics

Config, view and change IIS Log location

In this section, you can select several options:

IIS logging options

Log File format

Four types of log format are supported:

  • IIS Microsoft IIS log file format. Fixed text ASCI. The fields are separated by commas;
  • NCSA – National Center for Supercomputing Applications log file format. Fixed text ASCI format. The fields are separated by spaces, and the time is recorded according to local time with an indication of the offset relative to the UTC;
  • W3C centralized W3C log file format. You can specify the fields that are logged. The fields are separated by spaces. UTC time is used;
  • Custom customer logging format.
READ ALSO  How to Install phpMyAdmin on IIS in Windows 8/Server 2012

If you select W3C file format you can switch from standard file logging format to Event Tracing for Windows (ETW). This is high-performance logging system (first introduced in Windows Vista). When it is used, IIS saves HTTP logs to a specific trace log via the Event Tracing for Windows (ETW) service. ETW does not replace a regular event log and usually serves for short-term diagnostics of applications or the system.

Tip. To view and analyze IIS logs in ETW logs, use the free Microsoft Message Analyzer tool.

w3c etw event only

Log File Directory

By default, the %SystemDrive%\inetpub\logs\LogFiles directory is used to store logs. Over time, IIS log files can take up a large amount of space on the system drive. Therefore, with a large number of requests to IIS sites, it is recommended to store the logs on a separate drive.

Log File Rollover

In the Log File Rollover section you can configure rules for creating new log files (hourly, daily, maximum log size, etc.)

For the convenience of analyzing log files, it is recommended to enable the option Use local time for file naming and rollover (in this case instead of Coordinated Universal Time (UTC), the local time of the server will be logged in the logs).

READ ALSO  Setup Alerts for Tasks in SharePoint Online

IIS logging rollover

To view IIS logs, open the directory specified as the Log File Directory using File Explorer. Each folder contains the logs of a separate site. In our case, there is only one site on the IIS server, so there is only one log directory named W3SVC1.

Open this folder. In our case, it is IIS Logs configured to create a separate log file daily. The name of the file contains the date of its creation. Therefore, you can easily find a log file for a specific day.

IIS log files

By default, IIS logs are plain text files. You can easily open it in any text editor or export it to Excel for more convenient analysis.

IIS log file

You may also like:

Exchange 550 5.7.1 RESOLVER.RST.AuthRequired; auth... If you are trying to send email from your web server to a distribution group email and it isn't going through, and the Exchange log shows the followin...
How to Recreate Virtual Directories OWA and ECP on... This article describes how to recreate virtual directories OWA and ECP on Exchange 2016. The rebuilding of these virtual directories helps to reset al...
How to Delete IIS Log Files on Windows Server 2012 IIS (Internet Information Services) Web Server on Windows Server generates a sufficiently large amount of log files during its work. The main problem ...
Guide to SQL Server Transaction Log Backup In case you use Microsoft SQL Server you might heard about the Simple and Full database recovery models. Probably you also know that a Simple recovery...
Track messages in Exchange 2013 using Get-MessageT... In addition to directly analyzing transport log files, tracking messages in MS Exchange Server 2013 is very easy to carry out with the help of Message...