2

I often have to look at problems on live web servers, would like to know if there is a safe way to force an IIS log file rollover on a production server.

3 Answers 3

2

You could try temporarily changing the log file rollover settings, as described here:

http://technet.microsoft.com/en-us/library/cc754615(WS.10).aspx

Once the logs have rolled over, revert to your previous settings.

0

Are you sure about this, I've been supporting IIS web farms for years and had no issues with copying the current IIS log file to get all entries up to that point....(IIS 4,5,6 and 7)

How are you copying them?

1
  • I often use Symantect pcAnywhere to copy the files, so perhaps it's something peculiar to that program that's causing me problems. I'll edit the question slightly but I'd still like to know if there's a way to force a log file rollover, this sort of functionality is common in the UNIX world and SQL Server also has it. Nov 19, 2009 at 11:27
0

If you have the ability to take the server out of rotation, or you're working on a test server, then one option is to rename the current log file. IIS will then create a new one. For example, if you want to capture logs for one hour without having to filter them out of a larger file:

  • Take server out of rotation and stop IIS
  • Rename the latest log file
  • Start IIS, put server back into rotation
  • IIS creates a new log file
  • Wait one hour
  • Copy the latest log file, and you have a file with one hour of log data

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .