Annchienta::LogManager Class Reference

List of all members.

Public Member Functions

void enable (bool enableLogger)
void error (const char *fmt,...)
bool isEnabled () const
bool isLogToFile () const
 LogManager (const char *fileName="log.txt")
void logToFile (bool value)
void message (const char *fmt,...)
void warning (const char *fmt,...)
 ~LogManager ()

Private Attributes

bool enabled
FILE * logFile
bool m_logToFile


Detailed Description

This is a class used to place stuff in the log file.

Constructor & Destructor Documentation

Annchienta::LogManager::LogManager ( const char *  fileName = "log.txt"  ) 

Annchienta::LogManager::~LogManager (  ) 


Member Function Documentation

void Annchienta::LogManager::enable ( bool  enableLogger  ) 

Enables or disables the logger. The logger is enabled by default.

Parameters:
enableLogger If the LogManager should log.

void Annchienta::LogManager::error ( const char *  fmt,
  ... 
)

Prints an error to the log file. And stops the engine.

Parameters:
fmt Text, like passed to prinf in C.

bool Annchienta::LogManager::isEnabled (  )  const

Checks if the logger is enabled.

Returns:
If the LogManager is enabled.

bool Annchienta::LogManager::isLogToFile (  )  const

Checks if the Logger should log to a file.

Returns:
If the Logger logs to a file.

void Annchienta::LogManager::logToFile ( bool  value  ) 

Makes the Logger log to a file instead of to stdout. Disabled by default.

Parameters:
value If the LogManager should log to a file.

void Annchienta::LogManager::message ( const char *  fmt,
  ... 
)

Prints a message to the log file.

Parameters:
fmt Text, like passed to prinf in C.

void Annchienta::LogManager::warning ( const char *  fmt,
  ... 
)

Prints a warning to the log file.

Parameters:
fmt Text, like passed to prinf in C.


Member Data Documentation

Whether the LogManager should log or not.

File everything will be written to.

Whether the logManager should log to a file or to stdout.


Generated on Wed Feb 4 16:31:47 2009 for Annchienta by  doxygen 1.5.7.1