op_prg_log_handle_severity_set()
Abstract
Sets the severity type for log entries written to a given log handle.
Syntax
op_prg_log_handle_severity_set (handle_ptr, severity)
| Argument | Type | Description |
|---|---|---|
handle_ptr |
Log_Handle * |
Log handle identifying the simulation log category of interest. |
severity |
“PrgT_Log_Severity_Type“ |
Severity type to be set for log entries written to the log handle; one of the symbolic values listed in Table 2 on page 80. |
Return Type
Compcode
OPC_COMPCODE_FAILURE if handle_ptr is invalid or severity is nil; OPC_COMPCODE_SUCCESS otherwise.
Example
PrgT_Log_Severity_Type severity;
Compcode status;
/* Configuration related notification handles. */
conf_log_handle = op_prg_log_handle_create (OpC_Log_Category_Configuration, "ATM", "Setup", atm_conf_log_limit);
status = op_prg_log_handle_severity_get (conf_log_handle, &severity);
if ((status != OPC_COMPCODE_FAILURE) && (severity != PrgC_Log_Severity_Warning))
op_prg_log_handle_severity_set (&conf_log_handle, PrgC_Log_Severity_Warning);
Details
None.
Purpose
Provides a way to set the severity type for future log entries written to a given log handle.
Errors
- Recoverable Error: Invalid log handle.
- Recoverable Error: Specified severity (
<severity>) is not a valid value.
Reference
- Use the KP op_prg_log_handle_severity_get() to get the severity type being used for log entries written to a given log handle