NGN_LOG.H

METHODS of the class


Method

bool OpenLogFile(std::string log_file, bool overwrite = true);

Description

Opens and enables the system event log file at the specified path and name. All warning or error messages generated by the library, as well as those created through the Message() method, will be stored in this plain text file. Optionally, it can be specified whether the file is overwritten (default option) or the information is appended below. This method will return FALSE if it cannot create or enable the log file.

Example

ngn->log->OpenLogFile("debug_log.txt");

Method

void CloseLogFile();

Description

Closes and disables the active log file. Even if this method is not called, the file will be automatically closed when the program finishes.

Example

ngn->log->CloseLogFile();

Method

void Message(std::string msg);

Description

Prints the content of the STRING-format text of the given parameter to the debug console, automatically adding the current timestamp. If the log file is enabled, this information will also be saved in that file.

Example

ngn->log->Message(“Hello World!”);
Back to Index Versión en Español Back to Top