Interactive SourceMeter® Instrument Reference Manual Section 8:
2461-901-01 A/November 2015 8-71
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
Also see
Using the event log (on page 2-142)
eventlog.save()
This function saves the event log to a file on a USB flash drive.
Type TSP-Link accessible
Affected by Where saved Default value
Function Yes
Usage
eventlog.save(filename)
eventlog.save(filename, eventType)
A string that represents the name of the file to be saved
Limits the return to specific event log types; set a cumulative integer value that
represents the event log types to:
• Errors only: eventlog.SEV_ERROR or 1
• Warnings only: eventlog.SEV_WARN or 2
• Errors and warnings only: eventlog.SEV_WARN|eventlog.SEV_ERROR or
3
• Information only: eventlog.SEV_INFO or 4
• Errors and information only: eventlog.SEV_INFO|eventlog.SEV_ERROR
or 5
• Warnings and information only:
eventlog.SEV_INFO|eventlog.SEV_WARN or 6
•
All events: eventlog.SEV_ALL or 7 (default)