prg_log_open()

Abstract

Opens a log and initializes it for reading or writing.

Syntax

prg_log_open (log_name, log_directory, options, status_ptr)
Argument Type Description
log_name const char * Name of the log (no path or extension).
log_directory const char * Full path of the directory containing the log, or an empty string (optional; see Details).
options int Options for the open operation (see options).
status_ptr PrgT_Log_Store_Status * Area to be filled with the result of the open operation; one of the symbolic values listed in Table 2.

Return Type

PrgT_Log_Store_Handle

The newly opened log, or PRGC_NIL if the operation failed.

prg_log.h

Details

If the log is a tfile, only the log_name argument is needed to locate and open the log in the default tfile directory. If the log is not a tfile, you can use the log_directory argument to specify the directory containing the log (that is, the directory containing the <log name>.olf.dir directory).

options

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

  • PRGC_LOG_OPEN_OPT_READ—open the log for reading; return null if the log file doesn't exist
  • PRGC_LOG_OPEN_OPT_WRITE—open the log for writing and delete any previous rows
  • PRGC_LOG_OPEN_OPT_APPEND—open the log for writing and preserve any previous rows
  • PRGC_LOG_OPEN_OPT_HIDE_DATE—do not add the default date to the log template
  • PRGC_LOG_OPEN_OPT_INCLUDE_SEVERITY—include incident severity as the second column of the template (following the date); when this option is set, all rows written to the log must include severity (use the PrgT_Log_Severity_Type values listed in Table 2)
  • PRGC_LOG_OPEN_OPT_NO_PROGRESS_BAR—suppress the progress bar display when opening

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · 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