Vcl.SvcMgr.TService.LogMessage

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure LogMessage(Message: String; EventType: DWord = 1;
Category: Integer = 0; ID: Integer = 0);

C++

void __fastcall LogMessage(System::UnicodeString Message, unsigned EventType = (unsigned)(0x1), int Category = 0x0, int ID = 0x0);

Properties

Type Visibility Source Unit Parent
procedure
function
public
Vcl.SvcMgr.pas
Vcl.SvcMgr.hpp
Vcl.SvcMgr TService

Description

Sends an error message to the event log.

LogMessage sends an error message to the event log when an error or exception occurs. By default the EventType is EVENTLOG_ERROR_TYPE (usually indicating a loss of functionality or data) and the category and ID are zero. For example, if a service cannot be loaded as the system boots, it can log an error event, and the category and ID are zero.

The EventType specifies the type of event being logged. This parameter can be one of the following values.



Value Meaning

EVENTLOG_WARNING_TYPE

Warning event

EVENTLOG_INFORMATION_TYPE

Information event

EVENTLOG_AUDIT_SUCCESS

Success Audit event

EVENTLOG_AUDIT_FAILURE

Failure Audit event

EVENTLOG_ERROR_TYPE

Error event



The Category parameter specifies the event category, which is source-specific information and can have any value.

The ID parameter specifies the event identifier, which is the message that goes with this event as an entry in the message file associated with the event source.