1

I have an IIS version 8.5 web server running on Windows Server 2012 R2. Logging is configured on this server to write a new log file daily to %SystemDrive%\inetpub\logs\LogFiles.

My "Log Event Destination" is set to Log file only, but clearly, if the logs are only being written once a day, the contents of today's log file is being cached somewhere prior to being dumped to disk. Where is this cache held, and can I access it so that I can read events logged today?

Cosmic Ossifrage
  • 1,640
  • 14
  • 23

2 Answers2

2

Each log is created a 0 hours UTC time, and added to as the day and activity progresses, probably with some memory caching. You will see any given days log file long before that day ends.

enter image description here

Clayton
  • 4,523
  • 17
  • 24
1

In addition to Craig's answer you should know that it's possible to immediately flush the most recent log entries to disk with the following command;

netsh http flush logbuffer

Without this the logs will flush automatically every minute or 64KB.

See this entry on Scott Forsyth's blog;

http://weblogs.asp.net/owscott/flush-http-and-ftp-logs-in-iis

Steve365
  • 1,263
  • 9
  • 16