Logging::Loggable − |
#include <loggingLoggable.h> Inherited by ACS::ThreadBase, ACS::ThreadManager, acscomponent::ACSComponentImpl, AsyncRequestThreadPool, BulkDataNTDDSLoggable, maci::ComponentListener, maci::ContainerServices, maci::MethodRequestThreadPool, and TimerImpl::Handler. |
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 |
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: |
• |
Upon construction it gets a Logger |
|||
• |
It returns the Logger upon request |
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. |
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. |
Logger::LoggerSmartPtr Logging::Loggable::logger_m [private] The logger |
Referenced by setLogger(). |
Generated automatically by Doxygen for ACS-2015.2 C++ API from the source code. |