How do I setup IIS to rotate logs?

Solution 1:

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.

Solution 2:

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

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


Solution 3:

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.).

Tags:

Logging

Iis