Public Member Functions | Private Attributes

Logging::Loggable Class Reference

#include <loggingLoggable.h>

Inheritance diagram for Logging::Loggable:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 Loggable ()
 Loggable (const std::string &loggerName)
 Loggable (Logger::LoggerSmartPtr logger)
virtual Logger::LoggerSmartPtr getLogger () const
virtual void setLogger (Logger::LoggerSmartPtr logger)
virtual ~Loggable ()

Private Attributes

Logger::LoggerSmartPtr logger_m

Detailed Description

Loggable is a base class for all classes that want to be able to use the logging system. It has just to very basic simple features:


Constructor & Destructor Documentation

Logging::Loggable::Loggable (  ) 

Constructor without parameters. This will set the default global logger.

Logging::Loggable::Loggable ( const std::string &  loggerName  ) 

Constructor with a logger name. This will instantiate a new logger with the given name.

Parameters:
loggerName A name for the logger. This should be a dot-separated name and should normally be based on the container/ component/client name.
Logging::Loggable::Loggable ( Logger::LoggerSmartPtr  logger  ) 

Constructor from another logger.

Parameters:
logger A smart pointer to an existing logger. This is assigned to the internal smart pointer so that the reference counting will make sure it will not be destroyed until in usage.
virtual Logging::Loggable::~Loggable (  )  [virtual]

Destructor.


Member Function Documentation

virtual Logger::LoggerSmartPtr Logging::Loggable::getLogger (  )  const [virtual]

Returns the Logger to be used for logs using a standrd interface. Can be overwritten in special cases.

Returns:
The Logger instance.
virtual void Logging::Loggable::setLogger ( Logger::LoggerSmartPtr  logger  )  [inline, virtual]

Sets logger. In this way is possible to (re)set the logger latter. A smart pointer to an existing logger. This is assigned to the internal smart pointer so that the reference counting will make sure it will not be destroyed until in usage.

References logger_m.


Member Data Documentation

The logger

Referenced by setLogger().


The documentation for this class was generated from the following file: