Home
%3CLINGO-SUB%20id%3D%22lingo-sub-984813%22%20slang%3D%22en-US%22%3EIssue%20with%20Advanced%20Logging%20creating%20logs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-984813%22%20slang%3D%22en-US%22%3E%3CP%3EIIS%207%2C%207.5%2C%20and%208%20used%20Advanced%20Logging%20feature%20as%20a%20customized%20logging%20option.%20IIS%208.5%20introduced%20Enhanced%20Logging%20which%20is%20a%20built-in%20feature.%20If%20you%20still%20have%20a%20server%20that%20is%20using%20Advanced%20Logging%2C%20you%20may%20run%20into%20an%20issue%20with%20logging.%20In%20other%20words%2C%20no%20logs%20are%20created.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFirstly%2C%20check%20the%20Advanced%20Logging%20module%20in%20IIS%20and%20make%20sure%20that%20it%20is%20enabled.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F154959iE8C04DB87C1E9823%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_0.jpeg%22%20title%3D%22clipboard_image_0.jpeg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAfter%20checking%20the%20module%20page%2C%20go%20to%20your%26nbsp%3BapplicationHost.config%26nbsp%3Bfile.%20In%20my%20case%2C%20it%20was%20not%20logging%20anything%20because%20the%3CCODE%3Eenabled%3D%22true%22%3C%2FCODE%3E%20attribute%20was%20missing.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F154957i474E86E176533A76%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_1.png%22%20title%3D%22clipboard_image_1.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1655986756%22%20id%3D%22toc-hId-1655986820%22%3E%26nbsp%3B%3C%2FH3%3E%0A%3CH3%20id%3D%22toc-hId--896170205%22%20id%3D%22toc-hId--896170141%22%3EEnable%2Fdisable%20Advanced%20Logging%20per%20website%3C%2FH3%3E%0A%3CP%3EWhen%20you%20try%20to%20enable%20or%20disable%20Advanced%20Logging%20per%20website%20by%20following%20the%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fiis%2Fextensions%2Fadvanced-logging-module%2Fadvanced-logging-readme%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ethis%20documentation%3C%2FA%3E%2C%20you%20may%20come%20across%20to%20the%20error%20below.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CEM%3EThe%20request%20is%20not%20supported.%20(Exception%20from%20HRESULT%3A%200x80070032)%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F154958i48F5E517DEFF9734%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_2.jpeg%22%20title%3D%22clipboard_image_2.jpeg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20order%20to%20get%20around%20this%20issue%20and%20configure%20Advanced%20Logging%20per%20site%2C%20you%20can%20use%20filters.%3C%2FP%3E%0A%3CP%3EFor%20example%3A%20Let%E2%80%99s%20say%20we%20don%E2%80%99t%20want%20logs%20for%20MigrationTest%20site.%20We%20can%20use%20the%20filter%20below%20to%20achieve%20it.%20Once%20you%20add%20this%20filter%2C%20It%20won%E2%80%99t%20create%20logs%20for%20that%20site%20anymore%20(If%20there%20is%20no%20log%20file%20in%20the%20folder%2C%20it%20will%20create%20a%20new%20one.%20However%2C%20it%20won%E2%80%99t%20log%20requests%20in%20this%20file)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20order%20to%20create%20a%20filter%20to%20disable%20logging%20for%20a%20site%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EGo%20to%20IIS%20Manager%20and%20click%20server%20name%3C%2FLI%3E%0A%3CLI%3EDouble%20click%26nbsp%3B%3CSTRONG%3EAdvanced%20Logging%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3CLI%3EDouble%20click%20the%20log%20definition%20(%25COMPUTERNAME%25-Server)%3C%2FLI%3E%0A%3CLI%3EClick%26nbsp%3B%3CSTRONG%3EEdit%20Filter%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3CLI%3EClick%26nbsp%3B%3CSTRONG%3EAdd%20Expression%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3CLI%3EFrom%26nbsp%3B%3CSTRONG%3EField%3C%2FSTRONG%3E%26nbsp%3Blist%2C%20choose%26nbsp%3B%3CSTRONG%3ESite%20Name%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3CLI%3EFrom%26nbsp%3B%3CSTRONG%3EOperator%3C%2FSTRONG%3E%26nbsp%3Blist%2C%20choose%26nbsp%3B%3CSTRONG%3ENot%20Equals%3C%2FSTRONG%3E%3C%2FLI%3E%0A%3CLI%3EIn%20the%26nbsp%3B%3CSTRONG%3EValue%3C%2FSTRONG%3E%26nbsp%3Bfield%2C%20enter%20the%20site%20name.%20Click%26nbsp%3BOK%26nbsp%3B%3C%2FLI%3E%0A%3CLI%3EClick%26nbsp%3B%3CSTRONG%3EApply%3C%2FSTRONG%3E%20and%20Reset%20IIS%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F154960i99B452E15DF9BB26%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_3.png%22%20title%3D%22clipboard_image_3.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-984813%22%20slang%3D%22en-US%22%3E%3CP%20style%3D%22margin%3A%200cm%200cm%207.5pt%200cm%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2013.5pt%3B%20font-family%3A%20'Arial'%2Csans-serif%3B%20color%3A%20%236b6b6b%3B%22%3EIIS%207%2C%207.5%2C%20and%208%20used%20Advanced%20Logging%20feature%20as%20a%20customized%20logging%20option.%20IIS%208.5%20introduced%20Enhanced%20Logging%20which%20is%20a%20built-in%20feature.%20If%20you%20still%20have%20a%20server%20that%20is%20using%20Advanced%20Logging%2C%20you%20may%20run%20into%20an%20issue%20with%20logging.%20In%20other%20words%2C%20no%20logs%20are%20created.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-TEASER%3E
Microsoft

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