I've used Apache for years and I've taken for granted that it handles log rotation for me. I've been digging through the IIS config and googling, but I can't find an option for IIS to turn on log rotation.

What is the preferred way to configure IIS to delete logs past a certain threshold? Are there any products out there that do this for you? What do enterprisy Windows shops do?

Configuration: IIS 6.0 / Windows Server 2003 32-bit

link|improve this question

75% accept rate
feedback

4 Answers

up vote 3 down vote accepted

There's no built in mechanism to handle log rotation or archiving. There may be third party products to handle this chore or you could script something and configure a scheduled task. I have only a handfull of IIS servers so I just set up a recurring Task in Outlook to remind me monthly to delete IIS log files older than 30 days.

link|improve this answer
feedback

Have a look at the IIS Logs tool (http://www.iislogs.com/). There are a couple of different ways to install this and does a very effective job at managing IIS and other log files (compress files to .zip format, move them to different locations, delete files past a certain date, etc.).

link|improve this answer
feedback

Check: http://www.808.dk/?code-iis-log-housekeeping

A bunch of scripts are available, which you can add in the scheduled task = logrotation :)

link|improve this answer
feedback

The other answers are good, and offer a more robust solution to this problem. If you just need a quick fix, you can setup CCleaner to automatically clean your logs folder each time you login, or on a schedule.

Keep in mind, though, that this deletes all logs, not just aging files.

I followed these instructions but added that I wanted it to run even when the user was logged off, as is the normal case on a server.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.