Discussion Locked

Log Files on IIS

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a two IIS servers that were setup by a former colleague of mine. He enabled logging on both of them, but there is no one going through the logs anymore. While I was going through them the other day, I noticed that the folders C:\..\system32\logfiles on each of them exceeded 1G on one and 2G on the other. (Resulting in less than 200M of space on the C: drive of both servers.) I don't want this to blow up on me when I'm not looking. Is there an IIS setting to keep the log files/directoriesto a certain size?

Thank you.

2 replies

by mike

There is no way to do this in IIS. The first thing you need to do is decide how far back you want to keep the logs and delete any older than that. And you need to do it before you run out of space on your system drive...

Then you could write a batch file to run each day and delete the oldest log file.

But if you're not checking the logs, why don't you just switch off logging all together?

by richie

If you are using IIs 4.0 each Site/object on the server has the ability to choose what type of log. When you have chosen the type you can define the size of the file. You can also choose time periods, etc. This has the flexibility. If you are not on IIs 4.0 you may want to consider an upgrade. You can make the changes from the MMC (Microsoft Management Console).

This discussion is closed to new replies.