prg_log_handle_generate()
Abstract
Finds or creates a log handle for a specific log store, using specified column criteria.
Syntax
prg_log_handle_generate (log_store_hndl, incident_limit, …)
| Argument | Type | Description |
|---|---|---|
log_store_hndl |
PrgT_Log_Store_Handle |
Log store for which to generate a log handle. |
incident_limit |
unsigned long |
Maximum number of entries that can be recorded for this handle. |
| … | various | One or more tuples specifying the log columns of interest (see Details). |
Return Type
PrgT_Log *
The requested log handle.
Header
prg_log.h
Details
This function generates a log handle for a specific log store. The log handle is used with prg_log_handle_write() to add log entries to that log store. Each entry added to the log store in this way will have certain column values automatically filled in. These columns and the corresponding values are specified by the variable argument of this function (…), which consists of n tuples (n >= 1) followed by a null (PRGC_NIL) to terminate the argument string. Each tuple consists of a column title, value type, and value.
The incident_limit argument specifies how many entries can be added using the handle returned by this function. After this limit has been reached, further entries are ignored and not recorded in the log store.
If a log handle for the same log store and tuples already exists, this function returns that log handle. The incident limit of the existing log handle is set to incident_limit, if necessary, and the reference count of the log handle is incremented. If no matching log handle exists, this function creates a new one.