CEGUI::Logger Class Reference

Class that implements logging for the GUI system. More...

List of all members.

Public Member Functions

 Logger (void)
 Constructor for Logger object.
 ~Logger (void)
 Destructor for Logger object.
void setLoggingLevel (LoggingLevel level)
 Set the level of logging information that will get out to the log file.
LoggingLevel getLoggingLevel (void) const
 return the current logging level setting
void logEvent (const String &message, LoggingLevel level=Standard)
 Add an event to the log.
void setLogFilename (const String &filename, bool append=false)
 Set the name of the log file where all subsequent log entries should be written.

Static Public Member Functions

static LoggergetSingleton (void)
 Return the singleton Logger object.

Protected Attributes

LoggingLevel d_level
 Holds current logging level.
std::ofstream d_ostream
 Stream used to implement the logger.
std::vector< std::pair< String,
LoggingLevel > > 
d_cache
 Used to cache log entries before log file is created.
std::ostringstream d_workstream
 Used to build log entry strings.
bool d_caching
 true while log entries are beign cached (prior to logfile creation)


Detailed Description

Class that implements logging for the GUI system.


Member Function Documentation

LoggingLevel CEGUI::Logger::getLoggingLevel void   )  const [inline]
 

return the current logging level setting

Returns:
One of the LoggingLevel enumerated values specifying the current level of logging

Logger & CEGUI::Logger::getSingleton void   )  [static]
 

Return the singleton Logger object.

Returns:
Reference to the one and only Logger object

void CEGUI::Logger::logEvent const String message,
LoggingLevel  level = Standard
 

Add an event to the log.

Parameters:
message String object containing the message to be added to the event log.
level LoggingLevel for this message. If level is greater than the current set logging level, the message is not logged.
Returns:
Nothing

void CEGUI::Logger::setLogFilename const String filename,
bool  append = false
 

Set the name of the log file where all subsequent log entries should be written.

Note:
When this is called, and the log file is created, any cached log entries are flushed to the log file.
Parameters:
filename Name of the file to put log messages.
append 
  • true if events should be added to the end of the current file.
  • false if the current contents of the file should be discarded.

void CEGUI::Logger::setLoggingLevel LoggingLevel  level  )  [inline]
 

Set the level of logging information that will get out to the log file.

Parameters:
level One of the LoggingLevel enumerated values that specified the level of logging information required.
Returns:
Nothing


Generated on Sat Nov 26 09:35:51 2005 for Crazy Eddies GUI System by  doxygen 1.4.5