Installing Event Logging

To enable diagnostic event logging for your gateway to be controlled from the Microsoft Exchange Server Administrator progam, your installation program must create a Diagnostics key for the gateway service in the Windows NT Registry. This key must appear as a subkey of the gateway service’s registry entry. The following figure shows the registry entry for the MSExchangeDS service.

The path to the Diagnostics registry entry is

HKEY_LOCAL_MACHINE\ SYSTEM\CurrentControlSet\Services\Service Name\Diagnostics

where Service Name is the name of your gateway’s Windows NT Server service. To activate the Administrator program’s Diagnostics Logging property page for your gateway, the Diagnostic-reg-key attribute of your gateway’s Mail-Gateway object must be set to Service Name.

Subkeys of the Diagnostics key represent loggable events. The preceding figure shows 15 such events defined. Each event description consists of a resource identifier number followed by a string. The value associated with each subkey represents the significance level for logged events of that type.

Significance levels range from from 0 to 5, with 0 being the most significant (such as critical errors) and 5 the least significant (such as debugging output). The Microsoft Exchange Server administrator uses the Diagnostics Logging property page to set a diagnostic logging level that determines which events are written to the Windows NT Application event log. This level is typically set to 0 (critical errors), 1 (minimal), 3 (medium), or 5 (maximum). Events with a value less than or equal to the logging level are written to the event log. For more information about how the diagnostic logging level is used, see the Microsoft Exchange Server Administrator’s Guide.

To localize the registry key names to other languages, you must provide a resource DLL that contains the localized version of the event description strings for each language. An event description’s resource identifier number is the same in all languages. The resource DLL is placed in the server’s RES directory, which is shared as \\ServerName\RESOURCES. You must also create a DiagnosticsMessageFile registry key under the gateway service, containing the name of the DLL. The resource DLL is built from an .MC file so that it is in the correct format for the Windows NT Application event Log.