Log Files

In Apache, log files are created as text files usually in the World Wide Web Consortium's (W3C) default format. Various tools are available that can be used to report from and collate the information in these files in to usable reports.

IIS supports standard logging in W3C Extended Log format (the default for new sites) and customized formats. IIS also supports a number of IIS specific formats that include a new binary format in IIS 6. You can also configure IIS to log accesses directly into an ODBC connected database.


One of the most frequent queries I hear is "Where is my error log?" In IIS, there is unfortunately no provision for creating a separate error log ?the errors are placed in the main logging file, just as if you were using the combined log format within Apache. Note that some serious errors are logged by IIS to the Windows Application event log.

Log file properties are set within the WebSite property tab. You can see the configuration, including the available log options, in Figure 8.2.

Figure 8.2. Setting logging properties.


Logs also have their own set of logging properties. These set facilities automatically create a new log file after a set period (day, hour, file size), as well as the location of the files. The default location is C:\Windows\system32\LogFiles. You can see the property window in Figure 8.3.

Figure 8.3. Standard logging and rotation properties.


You can create customized logs?just as you can in Apache?by clicking the Advanced tab and selecting the specific fields that you want to populate within the log file.