Specifying How Log Files are Saved

You can specify the directory in which log files are saved. You can also specify the criterion that will cause IIS to begin a new log file instead of continuing to append to the old one. For example, you can specify that IIS will begin a new log file each week.

To specify options for the saving of log files
  1. Make sure that logging is enabled by following the procedure in Enabling Logging.
  2. Select a Web or FTP site and open its property sheets.
  3. On the Web Site or FTP Site property sheet, click Properties.
  4. The Logging Properties dialog box appears.

  5. On the General Properties property sheet, select the criterion you want IIS to use when starting a new log file.
  6. Note   For the Daily, Weekly, and Monthly criteria for new log files, "midnight" is defined in the time zone used by the chosen log format. This means that for NCSA Common Log File Format or ODBC Logging, "midnight" is on local time; for Microsoft IIS Log Format and W3C Extended Log File Format, "midnight" is on Greenwich Mean Time.

  7. Under Log file directory, type the directory in which log files should be saved, or click Browse and locate the directory.
  8. The directory must be local and the path cannot be relative. That is, you cannot use UNC paths such as \\server1\share1\, mapped network drives, or the characters  . .\  when you specify the log file directory.

  9. Click Apply.
  10. A file name is displayed beneath the box showing the directory; the file name pattern is explained in the following table.

  11. Click OK until you have closed all dialog boxes.

File Names for Logging

File names for logging use the first several letters to represent the logging format, and the remaining numbers to represent the time frame or sequence of the log. The following table provides details. The italicized letters represent digits: nn for sequential digits, yy for the year, mm for the month, ww for the week of the month, dd for the day.

Format Criterion for New Logs Filename pattern
Microsoft IIS Log Format By file size inetsvnn.log
Daily inyymmdd.log
Weekly inyymmww.log
Monthly inyymm.log
NCSA Common Log File Format By file size ncsann.log
Daily ncyymmdd.log
Weekly ncyymmww.log
Monthly ncyymm.log
W3C Extended Log File Format By file size extendnn.log
Daily exyymmdd.log
Weekly exyymmww.log
Monthly exyymm.log

© 1997 by Microsoft Corporation. All rights reserved.