OpenStudioCore:utilities
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Protected Member Functions | List of all members
openstudio::LoggerSingleton Class Reference

#include <Logger.hpp>

Public Member Functions

LoggerType & loggerFromChannel (const LogChannel &logChannel)
 get a logger from a LogChannel enumeration, if logChannel does not exist a new logger will be set up at the default level More...
 
LogSink standardErrLogger () const
 get logger for standard error More...
 
LogSink standardOutLogger () const
 get logger for standard out More...
 
 ~LoggerSingleton ()
 destructor, cleans up, writes xml file footers, etc More...
 

Protected Member Functions

void addSink (boost::shared_ptr< LogSinkBackend > sink)
 adds a sink to the logging core, equivalent to logSink.enable() More...
 
bool findSink (boost::shared_ptr< LogSinkBackend > sink)
 is the sink found in the logging core More...
 
void removeSink (boost::shared_ptr< LogSinkBackend > sink)
 removes a sink to the logging core, equivalent to logSink.disable() More...
 

Detailed Description

Singleton logger class.

Singleton Logger object maintains logging state throughout program execution.

Constructor & Destructor Documentation

openstudio::LoggerSingleton::~LoggerSingleton ( )

destructor, cleans up, writes xml file footers, etc

Member Function Documentation

void openstudio::LoggerSingleton::addSink ( boost::shared_ptr< LogSinkBackend >  sink)
protected

adds a sink to the logging core, equivalent to logSink.enable()

bool openstudio::LoggerSingleton::findSink ( boost::shared_ptr< LogSinkBackend >  sink)
protected

is the sink found in the logging core

LoggerType& openstudio::LoggerSingleton::loggerFromChannel ( const LogChannel &  logChannel)

get a logger from a LogChannel enumeration, if logChannel does not exist a new logger will be set up at the default level

void openstudio::LoggerSingleton::removeSink ( boost::shared_ptr< LogSinkBackend >  sink)
protected

removes a sink to the logging core, equivalent to logSink.disable()

LogSink openstudio::LoggerSingleton::standardErrLogger ( ) const

get logger for standard error

LogSink openstudio::LoggerSingleton::standardOutLogger ( ) const

get logger for standard out