Fawkes API  Fawkes Development Version
fawkes::LoggerAspect Class Reference

Thread aspect that allows to provide a logger to Fawkes. More...

#include <>>

Inheritance diagram for fawkes::LoggerAspect:

Public Member Functions

 LoggerAspect (Logger *logger) __attribute__((nonnull))
 Constructor. More...
 
virtual ~LoggerAspect ()
 Virtual empty destructor. More...
 
Loggerget_logger () const
 Get time source. More...
 
- Public Member Functions inherited from fawkes::Aspect
const std::list< const char * > & get_aspects () const
 Get list of aspect names attached to a aspected thread. More...
 

Additional Inherited Members

- Protected Member Functions inherited from fawkes::Aspect
void add_aspect (const char *name)
 Add an aspect to a thread. More...
 

Detailed Description

Thread aspect that allows to provide a logger to Fawkes.

The logger will be added to the list of loggers and will get all the log messages. This aspect can be used for example to attach Fawkes to a custom logging facility.

Author
Tim Niemueller

Definition at line 36 of file logger.h.

Constructor & Destructor Documentation

◆ LoggerAspect()

fawkes::LoggerAspect::LoggerAspect ( Logger logger)

Constructor.

Parameters
loggerLogger to add to the Fawkes loggers

Definition at line 46 of file logger.cpp.

References fawkes::Aspect::add_aspect().

◆ ~LoggerAspect()

fawkes::LoggerAspect::~LoggerAspect ( )
virtual

Virtual empty destructor.

Definition at line 53 of file logger.cpp.

Member Function Documentation

◆ get_logger()

Logger * fawkes::LoggerAspect::get_logger ( ) const

Get time source.

This method is called by the aspect initializer to get the time source the thread with this aspect provides.

Returns
logger provide by the thread with this aspect

Definition at line 64 of file logger.cpp.

Referenced by fawkes::LoggerAspectIniFin::finalize(), and fawkes::LoggerAspectIniFin::init().


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