Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | List of all members
vtLog Class Reference

#include <vtLog.h>

Public Member Functions

void StartLog (const char *fname)
 
void Log (const char *str)
 
void Log (char ch)
 
void Printf (const char *pFormat,...)
 
void Log (const wchar_t *str)
 
void Printf (const wchar_t *pFormat,...)
 

Detailed Description

This class provide a convenient way to log all the messages that your application generates. Everything logged will be saved to a file, and also be sent to the console. Under MSVC, the log output will go to the Debug Output window.

There is always and only a single vtLog instance (singleton), called g_Log.

To use:

Example:
VTSTARTLOG("debug.txt");
VTLOG("This code was compiled on %s\n", __DATE__);
VTLOG1("Program starting.\n");

That's it. The file will be flushed immediately after every write, so that log output will not be lost even if your application crashes.


The documentation for this class was generated from the following files: