CSCI441 OpenGL Library 6.1.0.0
CS@Mines CSCI441 Computer Graphics Course Library
Loading...
Searching...
No Matches
Functions
CSCI441::LogUtils Namespace Reference

Utility class to log information to the terminal and file

Usage:
(1) Filename defaults to 'csci441GL.log', call setLogFilename() at program start to change the output file name (2) At program start, call resetLogFile() to clear prior file if one exists. Otherwise, new logs will continue to be appended to existing file. More...

Functions

void setLogFilename (const char *filename)
 change the name of the log file that messages are saved to
 
void resetLogFile ()
 clears contents of log file (if it exists) and prints timestamp to file of when log was initially created
 
void log (const char *MSG,...)
 log a message to both the standard output stream and file
 
void logError (const char *MSG,...)
 log a message to both the standard error stream and file
 
void logToTerminal (const char *MSG,...)
 log a message to the standard output stream
 
void logToFile (const char *MSG,...)
 log a message to file
 

Detailed Description

Utility class to log information to the terminal and file

Usage:
(1) Filename defaults to 'csci441GL.log', call setLogFilename() at program start to change the output file name (2) At program start, call resetLogFile() to clear prior file if one exists. Otherwise, new logs will continue to be appended to existing file.

Function Documentation

◆ log()

void CSCI441::LogUtils::log ( const char *  MSG,
  ... 
)
inline

log a message to both the standard output stream and file

Parameters
MSGformatted string to print
...optional arguments to inject into string

◆ logError()

void CSCI441::LogUtils::logError ( const char *  MSG,
  ... 
)
inline

log a message to both the standard error stream and file

Parameters
MSGformatted string to print
...optional arguments to inject into string

◆ logToFile()

void CSCI441::LogUtils::logToFile ( const char *  MSG,
  ... 
)
inline

log a message to file

Parameters
MSGformatted string to print
...optional arguments to inject into string

◆ logToTerminal()

void CSCI441::LogUtils::logToTerminal ( const char *  MSG,
  ... 
)
inline

log a message to the standard output stream

Parameters
MSGformatted string to print
...optional arguments to inject into string

◆ setLogFilename()

void CSCI441::LogUtils::setLogFilename ( const char *  filename)
inline

change the name of the log file that messages are saved to

Parameters
filenamename of file to write out to