DSGetLogEntry

Use the DSGetLogEntry function to read the full event details of a specific log event with the name EventId.

Syntax


EventDetail = DSGetLogEntry (JobHandle, EventId)

JobHandle is the handle for the job as derived from DSAttachJob.

EventId is an integer that identifies the specific log event for which details are required. This is obtained using the DSGetNewestLogId function.

EventDetail is a string containing substrings separated by \. The substrings are as follows:

Substring1 Timestamp in form YYYY-MM-DD HH:NN:SS

Substring2 User information

Substring3 EventType - see DSGetNewestLogId

Substring4 Event message

If an error occurs, the error is reported by one of the following negative integer result codes:

  • DSJE.BADHANDLE Invalid JobHandle.
  • DSJE.BADVALUE Error accessing EventId.

Example

The following commands first get the EventID for the required log event and then reads full event details of the log event identified by LatestLogid into the string LatestEventString:


latestlogid = 
→ DSGetNewestLogId(qsales_handle,DSJ.LOGANY)
LatestEventString = 
→ DSGetLogEntry(qsales_handle,latestlogid)