Log Class Reference

#include <DebugFunctions.h>

List of all members.

Public Types

typedef Log &(*) manip_t (Log &)
typedef std::ostream &(*) std_manip_t (std::ostream &)
 OFF = 0
 DEBUG
 INFO
 WARN
 ERROR
 FATAL
enum  Level {
  OFF = 0, DEBUG, INFO, WARN,
  ERROR, FATAL
}

Public Member Functions

 Log ()
 Construct a logging object with the root logger.
 Log (const char *logger)
 Construct a logging object with the named logger.
 ~Log ()
void setLevel (Level l)
void writeLog ()
 Write logging information to the logfile.
Logoperator() (Level l)
 set the log level of this logger
template<typename T>
Logoperator<< (const T &rhs)
 Send data to be logged to this logger.
Logoperator<< (manip_t manip)
Logoperator<< (std_manip_t manip)

Static Public Member Functions

static Logwrite (Log &l)
 Manipulator used to write contents of logger to target.

Private Member Functions

bool enabled ()

Private Attributes

void * m_logger
Level m_level
std::ostringstream m_oss


Member Typedef Documentation

typedef Log&(*) Log::manip_t(Log &)

typedef std::ostream&(*) Log::std_manip_t(std::ostream &)


Member Enumeration Documentation

enum Log::Level

Enumerator:
OFF 
DEBUG 
INFO 
WARN 
ERROR 
FATAL 


Constructor & Destructor Documentation

Log::Log (  ) 

Construct a logging object with the root logger.

Log::Log ( const char *  logger  ) 

Construct a logging object with the named logger.

Log::~Log (  ) 


Member Function Documentation

bool Log::enabled (  )  [private]

Log& Log::operator() ( Level  l  )  [inline]

set the log level of this logger

Log& Log::operator<< ( std_manip_t  manip  )  [inline]

Log& Log::operator<< ( manip_t  manip  )  [inline]

template<typename T>
Log& Log::operator<< ( const T &  rhs  )  [inline]

Send data to be logged to this logger.

T must have a working operator<<(std::ostream&, const T &). No data is actually sent to the logger until the manipulator Log::write is found or the writeLog() function is called.

void Log::setLevel ( Level  l  )  [inline]

static Log& Log::write ( Log l  )  [inline, static]

Manipulator used to write contents of logger to target.

void Log::writeLog (  ) 

Write logging information to the logfile.


Member Data Documentation

Level Log::m_level [private]

void* Log::m_logger [private]

std::ostringstream Log::m_oss [private]


The documentation for this class was generated from the following file:
Generated on Sun Mar 11 15:33:26 2007 for MetalWarriors by  doxygen 1.4.7