Issue with Advanced Logging creating logs

This post has been republished via RSS; it originally appeared at: IIS Support Blog articles.

IIS 7, 7.5, and 8 used Advanced Logging feature as a customized logging option. IIS 8.5 introduced Enhanced Logging which is a built-in feature. If you still have a server that is using Advanced Logging, you may run into an issue with logging. In other words, no logs are created.

 

Firstly, check the Advanced Logging module in IIS and make sure that it is enabled.

clipboard_image_0.jpeg

 

After checking the module page, go to your applicationHost.config file. In my case, it was not logging anything because the enabled="true" attribute was missing.

clipboard_image_1.png

 

Enable/disable Advanced Logging per website

When you try to enable or disable Advanced Logging per website by following the this documentation, you may come across to the error below.

 

The request is not supported. (Exception from HRESULT: 0x80070032)

clipboard_image_2.jpeg

 

In order to get around this issue and configure Advanced Logging per site, you can use filters.

For example: Let’s say we don’t want logs for MigrationTest site. We can use the filter below to achieve it. Once you add this filter, It won’t create logs for that site anymore (If there is no log file in the folder, it will create a new one. However, it won’t log requests in this file)

 

In order to create a filter to disable logging for a site:

  1. Go to IIS Manager and click server name
  2. Double click Advanced Logging
  3. Double click the log definition (%COMPUTERNAME%-Server)
  4. Click Edit Filter
  5. Click Add Expression
  6. From Field list, choose Site Name
  7. From Operator list, choose Not Equals
  8. In the Value field, enter the site name. Click OK 
  9. Click Apply and Reset IIS

clipboard_image_3.png

REMEMBER: these articles are REPUBLISHED. Your best bet to get a reply is to follow the link at the top of the post to the ORIGINAL post! BUT you're more than welcome to start discussions here:

This site uses Akismet to reduce spam. Learn how your comment data is processed.