prg_log_handle_write()

Abstract

Writes an entry to a log store, using a specified log handle.

Syntax

prg_log_handle_write (log_hndl, options, …)
Argument Type Description
log_hndl PrgT_Log_Handle Log handle for the entry to be added.
options int Options for writing the log entry (see options).
… various Additional columns for the log entry (see …).

Return Type

PrgT_Compcode

PrgC_Compcode_Success if the entry was added successfully (or ignored because the incident limit was exceeded); PrgC_Compcode_Failure otherwise.

prg_log.h

Details

This function uses a log handle returned by prg_log_handle_generate() to add an entry to the log store associated with the log handle. The data for the columns of the entry will come from two sources:

  • The columns and values defined when the log handle was generated
  • Any additional columns and values specified by the variable argument (…) of this function

After assembling the log entry from these sources, this function increments the log handle's incident count. If the incident limit has not been exceeded (or if the PRGC_LOG_WRITE_OPT_IGNORE_LIMIT option is set), this function writes the entry to the log store.

options

The options argument must be either PRGC_LOG_WRITE_OPT_NONE or an OR'ed combination of the desired options:

  • PRGC_LOG_WRITE_OPT_COLUMN_NAME—the … values include column names
  • PRGC_LOG_WRITE_OPT_IGNORE_LIMIT—add the entry even if the incident limit for this log handle has been exceeded

…

The variable argument (…) specifies additional column data. This argument consists of [type, value] pairs for every column not defined in the log handle. These pairs must appear in the order in which the columns are defined in the log template.

If the PRGC_LOG_WRITE_OPT_COLUMN_NAME option is set, the … argument consists of one or more [column title, value type, value] tuples, followed by a null (PRGC_NIL) to terminate the argument string. In this case, only desired columns must be specified.

To write an entry directly to the log store (specifying all column values), use prg_log_write().

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com