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  Copy Taskbar Icons Windows 7 Sysprep

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  Change Password in Office 365 via Powershell

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:

How to Setup FTP Server in Windows 10 Nowadays the FTP technology is awesome and we decided to show how to setup and access an FTP server in Windows 10 in a simple way. How to create FTP ...
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...
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 Install phpMyAdmin on IIS in Windows 8/Serv... PHPMyAdmin is a web-based open source tool written in PHP designed to help manage MySQL database through the Web browser. Because of this PhpMyAdmin f...
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 ...