Instruction Manual

OEM External Specification
OEM User’s Guide520330-001
A-15
OEM Request API (Client Application to OEM)
LogMessage
LogMessage is used to add an event message to the OEM event log. This log serves as a
central source of information relating to the OEM environment and can be viewed by
users through the OEM main window.
Client applications can use this facility to keep a record of errors encountered interacting
with the OEM, to log application state information regarding the OEM, or other such
tasks.
Parameters
ClientName (input)
is a client-defined name used to identify the source of the event message.
ClientMessageNumber (input)
is a client-defined message number for this event. The OEM Server does nothing
with this value other than display it in the log, so multiple clients can use the same
message numbers.
MessageText (input)
is the event text.
Severity (input)
is the severity associated with the message, on a scale of 0 (lowest: informational
message) to 3 (highest: critical problem). The OEM Server log display is sorted in
descending order by event severity.
Return Value
None
Considerations
The OEM Server automatically adds the date and time to each logged message; clients
do not need to include this information in the MessageText field.
Example
Dim OEM As New OEMClass
OEM.LogMessage 'MyClientName', 1312, 'Unknown command received
from OEM', 1
In this example, the client application logs its message 1312 with severity 1.
Sub LogMessage(ClientName As String, ClientMessageNumber As
Long, MessageText As String, Severity As Integer)