Поделиться через


Creating Custom Logging Modules for IIS

A custom logging module must expose a base set of methods for IIS to use. These methods are defined in the ILogPlugin Interface or ILogPluginEx Interface interfaces. Your module may also support other proprietary methods that are specific to its specialized functions.

Note

Just as with any COM-compliant component, it is your responsibility to make sure any logging module you create indicates whether the module supports a specific method or not, using the standard COM QueryInterface mechanism. If a method is not supported, your logging module must return an appropriate COM error code.

To create and install a custom logging module

  1. Write a COM component that exposes the required methods specified by the ILogPlugin Interface or ILogPluginEx Interface interface definitions.

  2. Register the COM component with Regsvr32.exe.

  3. Add a Logging Module to the list of available logging modules by adding a key in the /LM/LOGGING path of the metabase. For more information, see the section titled "Adding a Logging Module" in the Setting Metabase Properties for Custom Logging Modules topic.

  4. Add a Custom Logging Module to a service for a particular Web site either by using the Administrative user interface or by using a script. For more information, see the section titled "Adding a Custom Logging Module to a Service" in the Setting Metabase Properties for Custom Logging Modules topic.

See Also

Concepts

Creating Logging User Interface Modules for IIS

Registering IIS Custom Logging Modules with COM

Creating a Single DLL for a Custom Logging Module, UI, and Registration

Customizing IIS Logging