Table of Contents

 
OpenLog
 

Purpose

Opens the error log for reporting

 

Protoype

void CError::OpenLog (string str_filename = "error_log.txt", string str_app = "CApp Application")
 

Parameters

filename the path or name of the file to open for reporting
app the name of the application
 

Description

This function opens the file specified with str_filename for writing as the application's log file. The file is open continuously after this until CloseLog() is called or the CError object is destroyed. This function also creates the log header, which lists the name of the application (an optional string value passed in for str_app) and the application date and start time. This lets you save logs and still know what log was from what application and when it was created.

 

Use

CError error;
error.OpenLog("err_log.txt");
 

Prev: LogItem
Next: SDLFailed