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.
Header
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 existPRGC_LOG_OPEN_OPT_WRITE—open the log for writing and delete any previous rowsPRGC_LOG_OPEN_OPT_APPEND—open the log for writing and preserve any previous rowsPRGC_LOG_OPEN_OPT_HIDE_DATE—do not add the default date to the log templatePRGC_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 thePrgT_Log_Severity_Typevalues listed in Table 2)PRGC_LOG_OPEN_OPT_NO_PROGRESS_BAR—suppress the progress bar display when opening