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

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 (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.
 Singleton (void)

Static Public Member Functions

static LoggergetSingleton (void)
 Return the singleton Logger object.
static LoggergetSingletonPtr (void)

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)

Static Protected Attributes

static Loggerms_Singleton = NULL

Detailed Description

Class that implements logging for the GUI system.

Definition at line 65 of file CEGUILogger.h.


Constructor & Destructor Documentation

CEGUI::Logger::Logger void   ) 
 

Constructor for Logger object.

Definition at line 43 of file CEGUILogger.cpp.

References logEvent().

CEGUI::Logger::~Logger void   ) 
 

Destructor for Logger object.

Definition at line 58 of file CEGUILogger.cpp.

References d_ostream, and logEvent().


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 110 of file CEGUILogger.h.

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 177 of file CEGUILogger.cpp.

Referenced by CEGUI::WindowFactoryManager::addFactory(), CEGUI::WindowFactoryManager::addFalagardWindowMapping(), CEGUI::WidgetLookFeel::addImagerySection(), CEGUI::WidgetLookFeel::addNamedArea(), CEGUI::WidgetLookFeel::addStateSpecification(), CEGUI::WidgetLookManager::addWidgetLook(), CEGUI::WindowFactoryManager::addWindowTypeAlias(), CEGUI::FontManager::createFont(), CEGUI::ImagesetManager::createImageset(), CEGUI::ImagesetManager::createImagesetFromImageFile(), CEGUI::WindowManager::createWindow(), CEGUI::Font::defineFontGlyphs(), CEGUI::FontManager::destroyFont(), CEGUI::ImagesetManager::destroyImageset(), CEGUI::WindowManager::destroyWindow(), CEGUI::Scheme_xmlHandler::elementEnd(), CEGUI::Imageset_xmlHandler::elementEnd(), CEGUI::Font_xmlHandler::elementEnd(), CEGUI::Falagard_xmlHandler::elementEnd(), CEGUI::Scheme_xmlHandler::elementStart(), CEGUI::Imageset_xmlHandler::elementStart(), CEGUI::Font_xmlHandler::elementStart(), CEGUI::Falagard_xmlHandler::elementStart(), CEGUI::WidgetLookManager::eraseWidgetLook(), CEGUI::Exception::Exception(), CEGUI::System::executeScriptFile(), CEGUI::System::executeScriptGlobal(), CEGUI::System::executeScriptString(), CEGUI::FontManager::FontManager(), CEGUI::WidgetDim::getValue_impl(), CEGUI::GlobalEventSet::GlobalEventSet(), CEGUI::ImagesetManager::ImagesetManager(), CEGUI::XercesParser::initialiseSchema(), CEGUI::Imageset::load(), CEGUI::Scheme::loadResources(), CEGUI::SchemeManager::loadScheme(), CEGUI::WindowManager::loadWindowLayout(), CEGUI::mac_getBundleSym(), CEGUI::mac_loadExeBundle(), CEGUI::mac_unloadExeBundle(), CEGUI::MouseCursor::MouseCursor(), CEGUI::ScriptFunctor::operator()(), CEGUI::WidgetLookManager::parseLookNFeelSpecification(), CEGUI::XercesParser::parseXMLFile(), CEGUI::Window::performChildWindowLayout(), CEGUI::WindowFactoryManager::removeFactory(), CEGUI::WindowFactoryManager::removeFalagardWindowMapping(), CEGUI::WindowFactoryManager::removeWindowTypeAlias(), CEGUI::SchemeManager::SchemeManager(), CEGUI::ScrolledContainerProperties::ChildExtentsArea::set(), CEGUI::MultiColumnListProperties::RowCount::set(), CEGUI::Window::setLookNFeel(), CEGUI::GlobalEventSet::subscribeEvent(), CEGUI::Scheme::unloadResources(), CEGUI::SchemeManager::unloadScheme(), CEGUI::Tooltip::updateSelf(), CEGUI::XercesHandler::warning(), CEGUI::WidgetLookManager::WidgetLookManager(), CEGUI::WindowFactoryManager::WindowFactoryManager(), CEGUI::WindowManager::WindowManager(), CEGUI::WidgetLookManager::writeWidgetLookToStream(), CEGUI::FontManager::~FontManager(), CEGUI::GlobalEventSet::~GlobalEventSet(), CEGUI::ImagesetManager::~ImagesetManager(), CEGUI::MouseCursor::~MouseCursor(), CEGUI::Scheme::~Scheme(), CEGUI::SchemeManager::~SchemeManager(), CEGUI::System::~System(), CEGUI::WidgetLookManager::~WidgetLookManager(), CEGUI::WindowFactoryManager::~WindowFactoryManager(), and CEGUI::WindowManager::~WindowManager().

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

Definition at line 67 of file CEGUISingleton.h.

Referenced by CEGUI::System::~System().

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 71 of file CEGUILogger.cpp.

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

Referenced by CEGUI::WindowFactoryManager::addFactory(), CEGUI::WindowFactoryManager::addFalagardWindowMapping(), CEGUI::WidgetLookFeel::addImagerySection(), CEGUI::WidgetLookFeel::addNamedArea(), CEGUI::WidgetLookFeel::addStateSpecification(), CEGUI::WidgetLookManager::addWidgetLook(), CEGUI::WindowFactoryManager::addWindowTypeAlias(), CEGUI::FontManager::createFont(), CEGUI::ImagesetManager::createImageset(), CEGUI::ImagesetManager::createImagesetFromImageFile(), CEGUI::WindowManager::createWindow(), CEGUI::Font::defineFontGlyphs(), CEGUI::FontManager::destroyFont(), CEGUI::ImagesetManager::destroyImageset(), CEGUI::WindowManager::destroyWindow(), CEGUI::Scheme_xmlHandler::elementEnd(), CEGUI::Imageset_xmlHandler::elementEnd(), CEGUI::Font_xmlHandler::elementEnd(), CEGUI::Falagard_xmlHandler::elementEnd(), CEGUI::Scheme_xmlHandler::elementStart(), CEGUI::Imageset_xmlHandler::elementStart(), CEGUI::Font_xmlHandler::elementStart(), CEGUI::Falagard_xmlHandler::elementStart(), CEGUI::WidgetLookManager::eraseWidgetLook(), CEGUI::Exception::Exception(), CEGUI::System::executeScriptFile(), CEGUI::System::executeScriptGlobal(), CEGUI::System::executeScriptString(), CEGUI::FontManager::FontManager(), CEGUI::WidgetDim::getValue_impl(), CEGUI::GlobalEventSet::GlobalEventSet(), CEGUI::ImagesetManager::ImagesetManager(), CEGUI::XercesParser::initialiseSchema(), CEGUI::Imageset::load(), CEGUI::Scheme::loadResources(), CEGUI::SchemeManager::loadScheme(), CEGUI::WindowManager::loadWindowLayout(), Logger(), CEGUI::mac_getBundleSym(), CEGUI::mac_loadExeBundle(), CEGUI::mac_unloadExeBundle(), CEGUI::MouseCursor::MouseCursor(), CEGUI::ScriptFunctor::operator()(), CEGUI::WidgetLookManager::parseLookNFeelSpecification(), CEGUI::XercesParser::parseXMLFile(), CEGUI::Window::performChildWindowLayout(), CEGUI::WindowFactoryManager::removeFactory(), CEGUI::WindowFactoryManager::removeFalagardWindowMapping(), CEGUI::WindowFactoryManager::removeWindowTypeAlias(), CEGUI::SchemeManager::SchemeManager(), CEGUI::ScrolledContainerProperties::ChildExtentsArea::set(), CEGUI::MultiColumnListProperties::RowCount::set(), CEGUI::Window::setLookNFeel(), CEGUI::GlobalEventSet::subscribeEvent(), CEGUI::Scheme::unloadResources(), CEGUI::SchemeManager::unloadScheme(), CEGUI::Tooltip::updateSelf(), CEGUI::XercesHandler::warning(), CEGUI::WidgetLookManager::WidgetLookManager(), CEGUI::WindowFactoryManager::WindowFactoryManager(), CEGUI::WindowManager::WindowManager(), CEGUI::WidgetLookManager::writeWidgetLookToStream(), CEGUI::FontManager::~FontManager(), CEGUI::GlobalEventSet::~GlobalEventSet(), CEGUI::ImagesetManager::~ImagesetManager(), ~Logger(), CEGUI::MouseCursor::~MouseCursor(), CEGUI::Scheme::~Scheme(), CEGUI::SchemeManager::~SchemeManager(), CEGUI::System::~System(), CEGUI::WidgetLookManager::~WidgetLookManager(), CEGUI::WindowFactoryManager::~WindowFactoryManager(), and CEGUI::WindowManager::~WindowManager().

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.

Definition at line 134 of file CEGUILogger.cpp.

References CEGUI::String::c_str(), d_cache, d_caching, d_level, and d_ostream.

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 100 of file CEGUILogger.h.

CEGUI::Singleton< Logger >::Singleton void   )  [inline, inherited]
 

Definition at line 58 of file CEGUISingleton.h.


Member Data Documentation

std::vector<std::pair<String, LoggingLevel> > CEGUI::Logger::d_cache [protected]
 

Used to cache log entries before log file is created.

Definition at line 151 of file CEGUILogger.h.

Referenced by logEvent(), and setLogFilename().

bool CEGUI::Logger::d_caching [protected]
 

true while log entries are beign cached (prior to logfile creation)

Definition at line 153 of file CEGUILogger.h.

Referenced by logEvent(), and setLogFilename().

LoggingLevel CEGUI::Logger::d_level [protected]
 

Holds current logging level.

Definition at line 149 of file CEGUILogger.h.

Referenced by logEvent(), and setLogFilename().

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

Stream used to implement the logger.

Definition at line 150 of file CEGUILogger.h.

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

std::ostringstream CEGUI::Logger::d_workstream [protected]
 

Used to build log entry strings.

Definition at line 152 of file CEGUILogger.h.

Referenced by logEvent().

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 Sep 7 10:06:35 2005 for Crazy Eddies GUI System by  doxygen 1.4.3