DiaDes  0.1
DIAgnosis of Discrete-Event System
Public Member Functions | Private Attributes | List of all members
Diades::Utils::Loggable Class Reference

#include <Loggable.hh>

Public Member Functions

 Loggable ()
 
 Loggable (const string &loggerName)
 
 Loggable (Logger &logger)
 
void changeLogger (const string &newLoggerName)
 
void changeLogger (Logger &newLogger)
 
Diades::Utils::Log log (Log::Level level, const char *msg)
 

Private Attributes

Logger _logger
 

Detailed Description

This class offers a logging service for the class that is deriving from it.

Definition at line 27 of file Loggable.hh.

Constructor & Destructor Documentation

◆ Loggable() [1/3]

Diades::Utils::Loggable::Loggable ( )
inline

Default constructor: any instance deriving from this instance will be logged with the default logger

Definition at line 37 of file Loggable.hh.

◆ Loggable() [2/3]

Diades::Utils::Loggable::Loggable ( const string &  loggerName)
inline

Parametrised constructor:

Parameters
loggerNamename of the looger: any instance deriving from this instance will be logged with the default logger

Definition at line 46 of file Loggable.hh.

◆ Loggable() [3/3]

Diades::Utils::Loggable::Loggable ( Logger logger)
inline

Paramtrised constructor:

Parameters
loggerNamename of the looger: any instance deriving from this instance will be logged with the default logger

Definition at line 55 of file Loggable.hh.

Member Function Documentation

◆ changeLogger() [1/2]

void Diades::Utils::Loggable::changeLogger ( const string &  newLoggerName)
inline

Change the logger with the one of the name newLoggerName

Parameters
newLoggerNamename of the new logger

Definition at line 63 of file Loggable.hh.

◆ changeLogger() [2/2]

void Diades::Utils::Loggable::changeLogger ( Logger newLogger)
inline

Change the logger

Parameters
newLoggerthe new logger

Definition at line 74 of file Loggable.hh.

◆ log()

Diades::Utils::Log Diades::Utils::Loggable::log ( Log::Level  level,
const char *  msg 
)
inline

Log a message with a given level to the default logger

Parameters
loggerthe Logger
msgthe message
Returns
the Log

Definition at line 89 of file Loggable.hh.

Referenced by Diades::Automata::Component::numberOfTransitions().

Member Data Documentation

◆ _logger

Logger Diades::Utils::Loggable::_logger
private

Definition at line 30 of file Loggable.hh.


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