In IIS 4.0 and later, logging modules are COM components that can efficiently generate server activity logs, without interfering with other server processes. When a loggable event occurs (usually an HTTP transaction), IIS calls the appropriate logging module, which then takes care of the actual log file management.
You may find, however, that you want to make use of logging capabilities beyond those provided by the built-in logging modules. Until IIS 4.0, you could add logging capabilities by using ISAPI filters that registered interest in particular server events.
With IIS 4.0 and later, however, the new logging architecture allows developers to extend the logging capabilities quickly and easily. In this new architecture, custom logging modules are added by registering a new COM component that implements a special interface. The newly registered component can then be established as the logging module for the server by using the administrative user interface, or programmatically by changing properties in the metabase. Your custom logging module will then be called by IIS to log requests, just as if it were a built-in logging module.
In addition, IIS 5.0 provides one further possibility. Using a new interface, exposed by IIS, your application can request IIS to generate an application-specific log record in the standard IIS log file, using the W3C Extended Logging module included with IIS. You can also, using IIS 5.0 or later, use a new metabase subtree to define new custom logging information types, which you can then log to IIS or custom log files.
Logging modules, built-in or custom, generally have logging user interface modules so that the administrators can configure the logging module. The built-in logging modules come with user interface modules that expose general logging properties, such as log file period and location. If you decide to create your own custom logging module, however, your user interface module is not restricted to performing just these tasks.
The Logging Utility component, introduced with IIS 5.0, allows developers to programmatically read log record information from log files. This is accomplished, through the Logging Utility component, by delegating the low-level reading of the actual log files to the particular logging module that created the log file. If you want your custom logging module to work with this component, you will need to implement another special interface to support log file reading operations.
The following figure shows the logging interfaces used by IIS and the Logging Utility component: