Propane::Log Class Reference

A singleton for maintaining HTML logs. More...

#include <LogSingle.h>

Inheritance diagram for Propane::Log:

Propane::Singleton< Log > List of all members.

Public Member Functions

 Log ()
virtual ~Log ()
 Basic destructor, closes any open file handles.
void openLog (const std::string &logFile)
void error (const std::string &message)
void normalLog (const std::string &message)
void warning (const std::string &message)
Logoperator<< (std::ostream &(*func)(std::ostream &))
template<class T>
Logoperator<< (T val)

Detailed Description

A singleton for maintaining HTML logs.


Constructor & Destructor Documentation

Propane::Log::Log  )  [inline]
 

Basic constructor, opens a log file named "log.html" in the current directory.


Member Function Documentation

void Propane::Log::error const std::string &  message  )  [inline]
 

Writes red text to the log.

Parameters:
message The HTML error message to write to the log file.

void Propane::Log::normalLog const std::string &  message  )  [inline]
 

Writes normal text to the log

Parameters:
message The HTML message to write to the log file.

void Propane::Log::openLog const std::string &  logFile  )  [inline]
 

Opens a log file with the intent to append to it. Writes the "Log begins at..." text to it.

Parameters:
logFile The path to the log file (e.g. "log.html")

template<class T>
Log& Propane::Log::operator<< val  )  [inline]
 

Writes text into the log file using a stream operator, creating a newline for each std::endl.

Parameters:
val The value to write into the log file
Returns:
The log object

Log& Propane::Log::operator<< std::ostream &(*)(std::ostream &)  func  )  [inline]
 

Stream operator that just takes in an ostream control character and replaces it with a line break.

Returns:
The stream

void Propane::Log::warning const std::string &  message  )  [inline]
 

Writes warning (green) text to the log

Parameters:
message The HTML warning message to write to the log file.


The documentation for this class was generated from the following file:
Generated on Sun Jan 14 16:49:12 2007 for Propane Injector by  doxygen 1.4.6