14: TSP command reference 2470 High Voltage SourceMeter Instrument
14-74 2470-901-01 Rev. A / May 2019
eventlog.post()
This function allows you to post your own text to the event log.
Type TSP-Link accessible
Affected by Where saved Default value
Usage
eventlog.post("message")
eventlog.post("message", eventType)
String that contains the message
The type of event; if no event is defined, defaults to
eventlog.SEV_INFO
ï‚§ Error: eventlog.SEV_ERROR or 1
ï‚§ Warning: eventlog.SEV_WARN or 2
ï‚§ Information: eventlog.SEV_INFO or 4
Details
You can use this command to create your own event log entries and assign a severity level to them.
This can be useful for debugging and status reporting.
From the front panel, you must set the Log Warnings and Log Information options on to have the
custom warning and information events placed into the event log.
Example
eventlog.post("my error", eventlog.SEV_ERROR)
print(eventlog.next())
Posts an event named "my error".
Output:
1005 User: my error 1 0 1359414094
769632040
Also see
Using the event log (on page 3-50)