共用方式為


Creating Logging User Interface Modules for IIS

When you create your own custom logging module, you have three user interface options.

  • No user interface module: This option is appropriate if your logging module has no configurable settings, or if you'd rather provide access to your logging module through mechanisms other than those used by IIS.

  • Use a built-in user interface module: You can, in effect, borrow one of the user interface modules provided with the built-in IIS logging modules. The user interface module GUID specified under the Microsoft IIS Log File Format key of the /LM/LOGGING path in the metabase is most appropriate for this use, because it provides basic configuration functionality.

  • Create a new user interface module: You can create your own COM object that implements the appropriate interfaces.

You are not restricted to performing any fixed set tasks in your user interface module.

To create and install a logging user interface module

  1. Either write a COM component that implements the ILogUIPlugin Interface interface, as defined in the ilogobj.h header file, or use one of the built-in user interface modules.

  2. Use Regsvr32.exe, or some other registration tool, to register the component.

  3. Add your logging user interface module GUID to the LogModuleUiId key in the metabase. For more information, see the section titled "Adding a Logging Module" in the Setting Metabase Properties for Custom Logging Modules topic

The UI module must be resident and registered on the machine on which Internet Service Manager is running. This requirement is particularly important if you intend to administer your custom logging module remotely; the logging module itself can be running on a remote machine, but the logging UI module must be local. If you intend to administer your logging module remotely, you should implement the logging module in a separate DLL from the logging module UI.

Example Code

The following example shows you how to use the C++ programming language to create a logging user interface module. This example creates a COM class that exposes the ILogUIPlugin methods.

For an example of a Main.cpp file that ties this example together with the examples in Creating Custom Logging Modules for IIS and Registering IIS Custom Logging Modules with COM, see Creating a Single DLL for a Custom Logging Module, UI, and Registration.

See Also

Concepts

Creating Custom Logging 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