How to Configure, View and Change IIS Log Location on Windows Server 2016?

As in earlier versions, the web server IIS 10.0 (Internet Information Services) on Windows Server 2016 enables storing HTTP requests and error logs for the sites it hosts. IIS log files make debugging, troubleshooting, and optimizing your web sites and applications much easier.
Logging can be configured on a per-server or per-site basis. Open the Internet Information Services (IIS) Manager console, choose the server name, and then the Logging option in the right pane to configure IIS logging on the server level.

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

Config, view and change IIS Log location

In this section, you can select several options

Log File format

Four types of log format are supported:

The IIS log file format is used by Microsoft IIS. ASCI text has been fixed. NCSA —– National Center for Supercomputing Applications log file format; commas separate the fields. Text in ASCI format has been fixed. W3C — centralised W3C log file format; the fields are separated by spaces, and the time is recorded in local time with an indication of the offset relative to UTC; You can choose which fields are logged. Spaces are used to divide the fields. Custom — customer logging format; UTC time is utilised.

Directory of Log Files

Logs are stored by default in the percent SystemDrive percent inetpublogsLogFiles directory. IIS log files can take up a lot of space on the system drive over time. As a result, if you have a lot of queries to IIS sites, you should keep the logs on a different device.

Rollover of Log Files

You can set up rules for creating new log files in the Log File Rollover section (hourly, daily, maximum log size, etc.)

It is advised to activate the option Use local time for file naming and rollover for ease of studying log files (in this case, instead of Coordinated Universal Time (UTC), the server’s local time will be noted in the logs).

To see IIS logs, launch File Explorer and navigate to the Log File Directory provided. Each folder holds the logs for a different location. Because the IIS server only hosts one site, there is only one log directory named W3SVC1.

This folder should be opened. In our scenario, IIS Logs is set to create a new log file every day. The date of the file’s creation is included in its name. As a result, you can quickly locate a log file on a given day.

IIS logs are plain text files by default. It’s simple to open in any text editor or export to Excel for more thorough study.

Leave a Reply

Your email address will not be published. Required fields are marked *




Enter Captcha Here :