Instruction Manual

OEM External Specification
OEM User’s Guide520330-001
A-64
OEM Callback API (Adapter 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 from the OEM main window.
Adapters can use this facility to perform tasks such as keeping a record of errors
encountered interacting with the OEM or framework or logging adapter state
information.
Parameters
AdapterName (input)
is an adapter-defined name used to identify the source of the event message.
AdapterMessageNumber (input)
is an adapter-defined message number for this event. The OEM Server does nothing
with this value other than display it in the log, so multiple adapters 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, so
adapters do not need to include this information in the MessageText field.
Example
' OEMServerCallbackObject was passed in a Popup.Add or
Object.Add call
OEMServerCallbackObject.LogMessage 'MyAdapterName', 100,
'Adapter started', 0
In this example, the adapter logs its message 100 with severity 0.
Sub LogMessage(AdapterName As String, AdapterMessageNumber As
Long, MessageText As String, Severity As Integer)