LogEvent

The LogEvent callback function records an event for a resource.

VOID WINAPI LogEvent(
  RESOURCE_HANDLE ResourceHandle,   
  LOG_LEVEL LogLevel,               
  LPCWSTR FormatString              
);
 

Parameters

ResourceHandle
[in] Handle identifying the resource recording the event. The value for ResourceHandle should be the handle passed in during the Open call for this resource.
LogLevel
[in] Constant that represents the log level of the event and is for information only. Valid values are shown next, in order from least to most severe:
LOG_INFORMATION
The event is informational.
LOG_WARNING
The event is reporting a failure that might have happened, but it is uncertain whether a failure really did occur.
LOG_ERROR
The event affects a single component, but other components are not affected and the integrity of the rest of the node is not compromised.
LOG_SEVERE
The event is reporting a severe failure that affects multiple components or the integrity of the entire system is compromised — or believed to be compromised.
FormatString
[in] Pointer to a formatted Unicode string that includes the information to be recorded. This string must be in the same format as is passed to the Win32 function FormatMessage.

Return Values

None.

Remarks

The LogEvent function is implemented by the Resource Monitor and called by a resource DLL to report events and errors to the cluster debugging log. Resource DLLs receive a pointer to the LogEvent function as an input parameter to their Startup entry point function.

To enable the cluster debugging log:

LogEvent does not write entries to the Microsoft® Windows NT® event log. To report events in the Windows NT event log, a resource DLL must call the Win32 function ReportEvent.

The format of the logged message looks like:

ResourceTypeName <specific resource name>: message

ResourceTypeName is the resource type, such as "Generic Application". The specific resource name is the user-friendly name for the specific resource and message is the message delivered by the resource DLL to the Resource Monitor.

QuickInfo

  Version: Use Windows NT Server Enterprise Edition 4.0.
  Windows CE: Unsupported.
  Header: Declared in resapi.h.