Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

CEGUI::Logger Class Reference

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

#include <CEGUILogger.h>

Inheritance diagram for CEGUI::Logger:

Inheritance graph
[legend]
Collaboration diagram for CEGUI::Logger:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Logger (const String &filename, bool append=false)
 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.

Static Public Member Functions

Logger & getSingleton (void)
 Return the singleton Logger object.
Logger * getSingletonPtr (void)

Protected Attributes

LoggingLevel d_level
 Holds current logging level.
std::ofstream d_ostream
 Stream used to implement the logger.

Static Protected Attributes

Logger * ms_Singleton = NULL

Detailed Description

Class that implements logging for the GUI system.

Definition at line 62 of file CEGUILogger.h.


Constructor & Destructor Documentation

CEGUI::Logger::Logger (  const String &  filename,
bool  append = false
) 
 

Constructor for Logger object.

Parameters:
filename Name of the file to put log messages.
append 
  • If true, events will be added to the end of the current file.
  • If false, the current contents of the file will be discarded.
Returns:
Nothing.

Definition at line 43 of file CEGUILogger.cpp.

References d_ostream, logEvent(), CEGUI::Standard, and CEGUI::utf8.

CEGUI::Logger::~Logger (  void   ) 
 

Destructor for Logger object.

Definition at line 61 of file CEGUILogger.cpp.

References d_ostream, logEvent(), and CEGUI::utf8.


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

Definition at line 117 of file CEGUILogger.h.

References CEGUI::LoggingLevel.

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

Return the singleton Logger object.

Returns:
Reference to the one and only Logger object

Reimplemented from CEGUI::Singleton< Logger >.

Definition at line 131 of file CEGUILogger.cpp.

Logger * CEGUI::Singleton< Logger >::getSingletonPtr (  void   )  [inline, static, inherited]
 

Definition at line 68 of file CEGUISingleton.h.

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

Definition at line 74 of file CEGUILogger.cpp.

References d_level, d_ostream, CEGUI::Errors, CEGUI::Informative, CEGUI::Insane, and CEGUI::Standard.

Referenced by Logger(), and ~Logger().

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

Definition at line 107 of file CEGUILogger.h.


Member Data Documentation

LoggingLevel CEGUI::Logger::d_level [protected]
 

Holds current logging level.

Definition at line 139 of file CEGUILogger.h.

Referenced by logEvent().

std::ofstream CEGUI::Logger::d_ostream [protected]
 

Stream used to implement the logger.

Definition at line 140 of file CEGUILogger.h.

Referenced by logEvent(), Logger(), and ~Logger().

Logger * CEGUI::Singleton< Logger >::ms_Singleton = NULL [static, protected, inherited]
 

Definition at line 37 of file CEGUILogger.cpp.


The documentation for this class was generated from the following files:
Generated on Wed Feb 16 12:41:10 2005 for Crazy Eddies GUI System by  doxygen 1.3.9.1