2

Logging is enabled for a site in IIS with the following settings:

  • One log file per: Site
  • Format: W3C
  • Directory: %SystemDrive%\inetpub\logs\LogFiles
  • Encoding: UTF-8
  • Schedule: Daily

However, logging data is still just appended to a single file (a new one is not created every day). Has anyone else experienced this? If so, how do we resolve it?

Harald Greve
  • 147
  • 3
  • 14
  • How long have you actually been running the website? IIS logs use UTC instead of your computer's local time, so if it isn't past midnight UTC then you won't see separate logfiles. – Dai Feb 14 '17 at 09:25
  • Also, have you restarted IIS (not just the worker processes, but `inetinfo.exe`) just to be sure? – Dai Feb 14 '17 at 09:25
  • 1
    Finally, where is this particular configuration stored in your system? Are you certain you don't have any other configuration files (including those located in the filesystem) which will override per-server and per-website settings? – Dai Feb 14 '17 at 09:26
  • @Dai, I'm not sure where this configuration is stored. Would it be here: %windir%\Microsoft.NET\Framework\[version]\config\web.config? I can't really see the relevant sections of that though, relating to the issue we're having. – Harald Greve Feb 14 '17 at 09:59

1 Answers1

2

I had the same problem.

I found possible solutions on: https://social.technet.microsoft.com/Forums/en-US/704f1998-ee9e-43e9-b618-c1bbfb64f0e6/iis-not-creating-log-files?forum=winserver8gen

You could double check the permission on the log file folders, IIS will not write to folders owned by certain groups, such as users.

The folder should be owned by "Administrators" or "SYSTEM".

Also check that the W3C Logging Service is running!

In my case the W3C Logging Service was not running.

Community
  • 1
  • 1
Peter
  • 33
  • 7