RAD Studio VCL Reference
|
Sends an error message to the event log.
procedure LogMessage(Message: String; EventType: DWord = 1; Category: Integer = 0; ID: Integer = 0);
__fastcall LogMessage(AnsiString Message, DWord EventType = 1, int Category = 0, int ID = 0);
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.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|