IIS7 Logging

Starr Duskk
Starr Duskk used Ask the Experts™
Our server ran out of hard drive space. We noticed that it was due to W3c logs.
We saw a forum post that said it was okay to delete them, so we did.

I found the property for Logging. I would like to know what the recommended setting is for purging log files, etc., to keep these in check.

We have never used them, nor had a need for them.

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Jose TorresCertified Database Administrator

First as a general rule I avoid putting the log files on the C drive unless I have no other drives available as C drives are generally configured smaller.  That alone would save you some grief down the road.

Now on to your question.
The logging you found does not control purging.  Rare as it may be there is no built in feature to purge log files.  What you are looking at is the basic configuration for logging.
The Log File section is pretty much what format, which fields and where you want the log files to be stored.
The Log File Rollover is basically states how often to create a new log file.

Check out the following links they may give you an idea on which way to go
Managing IIS Log File Storage
ODBC Logging <odbcLogging>
Starr DuskkASP.NET VB.NET Developer


In a nutshell, how do I turn them off and what are the ramifications if I do?

I have never personally ever done anything with log files since 1999. But maybe the system does, so I don't know.

Also, if I were to move them to the docs server on S:
It would just be this change?

Once I change that, do I need a reboot? Will it mess up users who are online at the time? (After I deleted them the other day, weird things happened on the server and we did a reboot. Could have been a coincidence, but who knows.)

And I notice I can set it to Daily, Weekly, Monthly. If I set it Monthly instead of daily, will that use less drive space and be fine? What are the ramifications of that?

SOS (sorry so stupid)

Certified Database Administrator
Unless all the web apps have the custom coded logging i would generally not disable iis logging.
But keep in mind that this is pure iis logging it will record all connections and where those connections go.  So it is helpful for an admin when an user starts to complain that the web site doesnt work

Yes that is all you have to change.  I personally make the parent directory IISLog and a child directory for each web site.
S:\IISLog\WebSite80  - This is the default web site on port 80
S:\IISLog\WebSite8181 - This is an additional web site on port 8181

No you do not need a reboot.  I did this a few months back on all my prod servers.
Once you change the destination the next time that a someone accesses the web site it will automatically generate a new log file.
I don't know why your server started acting up after deleting log files, they are not tied to the os and only the latest one is active with iis at any one time.  Did you see anything strange in the event viewer?

No setting it daily, weekly.... does not save on disk space.
If you set it to weekly what happens is that the current iis log file will be active for one week and it will get larger than the dailys.  Normally not a big deal unless you have a lot of usage and if you ever have to open it to troubleshoot it will not be fun finding something.

No worries, Ive been in this business 20+ years and feel the same way sometimes.

Let me know if you need anything else or to clarify.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial