The Microsoft® Internet Information Server (IIS) logging interface provides you with a flexible method for generating server activity logs without interfering with other server processes. Using this architecture, you can move most of the maintenance of event logs from virtual servers to logging modules. A logging module is a COM component that exposes methods to IIS. When a log event occurs, IIS calls the appropriate log module's LogInformation method and provides it with a pointer to an IInetLoginformation interface. The logging module then uses the interface to record the log information. IIS determines which IINetLogInformation methods to expose to the logging module as specified by the MD_LOGEXT_FIELD_MASK identifier in the metabase.
IIS contains four built-in logging modules; you can also create custom logging modules to meet your own needs. To do this, you should create a COM object that exposes the methods specified in ILogPlugin Interface.
The logging architecture is new with this version of IIS. Previously, you could create custom logging capabilities through ISAPI filters that registered interest in particular server events. The new architecture makes use of COM to facilitate the development of customized logging. In this architecture, logging modules are added by registering a COM object that supports the methods required by IIS. The registered object can then be established as the logging module for a virtual directory by setting the MS_LOG_PLUGIN_ORDER property with a script, or by selecting the module through the administrative user interface.
If you create a custom logging module, you should also provide a logging user interface module so that administrators can configure your logging module. The built-in logging modules come with user interface modules that expose general logging properties, such as log file period and location. Your user interface module, however, is not restricted to performing just these tasks.
The new logging architecture relies on three interfaces that are defined in the ilogobj.h file. The IINetLogInformation and ILogPlugin interfaces expose methods that are used to log server transactions, while the ILogUIPlugin interface is implemented by the user interface module for the logging module. All three interfaces inherit the IUnknown interface.
ILogPlugin interface also provides methods that IIS uses to manage a logging module. IIS calls these methods to initialize, shut down, and configure the logging module.