Finds the first diagnostic log entry that matches the specified criteria.
#include <diag/diag_log.h> int dlog_find_first(dl_info *dlogInfo,char *criteria,dlSearch *filter,dlEntry **results)
The dlog_find_first subroutine finds the first diagnostic log entry that matches the specified criteria. It also parses the search criteria and uses this to initialize the dlSearch structure for subsequent searches. It allocates memory for the matching entry, and returns the array index of the matching entry. It is the responsibility of the calling application to free the memory allocated for dlEntry.
Parameter | Description |
---|---|
dlogInfo | Pointer to log information in dl_info |
criteria | search criteria consisting of any of the following:
|
filter | parsed search criteria |
results | pointer to entry matching the search criteria |
Call this function before calling dlog_find_next.
Upon successful completion, a value >= 0 is returned. Otherwise, a value of -1 is returned.