LogEvent
KCM Core sends a message to the NT Event Logging Service.
See the documentation of Microsoft Windows NT for an explanation of Source Identifiers, Event Types, and Event IDs. The default behavior of KCM Core is to write an error event to the event log with the text "Error: %1," where %1 is substituted by the text of the parameter Record.
The following Event IDs are available through the ITPSERVERMSG.DLL:
Event ID |
(Hexadecimal) |
Text |
3221225672 |
0xC00000C8 |
Error: %1. |
1073742025 |
0x400000C9 |
Warning: %1. |
1073742026 |
0x400000CA |
Progress: %1. |
1073742027 |
0x400000CB |
Info: %1. |
The ITPSERVERMSG.DLL must be installed on the host to have it show the correct text in the Event Viewer.
Syntax
LogEvent
Record(<text>)
Host(<text>)
EventType(<number>)
EventID(<number>)
Source(<text>);
Parameters
- Record: Required. The record (message text) sent to the Event Log.
- Host: Optional. The remote host where the event is logged. To see the correct text in the Event Viewer, ensure that ITPSERVERMSG.DLL is installed on the host. If this parameter is not specified, KCM Core logs the record on the local machine; ITPSERVERMSG.DLL is automatically installed on the host that KCM Core is installed on.
- EventType: Optional. The type of the event that KCM Core logs. If this parameter is not specified, KCM Core logs the record as type 1 (error).
- EventID: Optional. The ID of the event that KCM Core logs. If this parameter is not specified, KCM Core logs the record with an ID of 3221225672 or 0xC00000C8 (hexadecimal). See the table earlier in this section.
- Source: Optional. The source identifier of the event that KCM Core logs. If this parameter is not specified, KCM Core uses the source identifier "ITPEvent". If another Source is specified, the Event ID as listed earlier becomes invalid.