Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
IndependentLogger Class Referenceabstract

Base Log handler class that utilises Boost logging to create log sinks. More...

#include <ored/utilities/log.hpp>

+ Inheritance diagram for IndependentLogger:
+ Collaboration diagram for IndependentLogger:

Public Member Functions

virtual ~IndependentLogger ()
 Destructor. More...
 
virtual void removeSinks ()=0
 
std::vector< std::string > & messages ()
 
void clear ()
 
const std::string & name () const
 Returns the Logger name. More...
 

Protected Member Functions

 IndependentLogger (const std::string &name)
 Constructor. More...
 

Protected Attributes

std::vector< std::string > messages_
 

Private Attributes

std::string name_
 

Detailed Description

Base Log handler class that utilises Boost logging to create log sinks.

This type of logger should only be received via Log::registerIndependentLoggers(). It is responsible for creating and maintaining Boost log sink/s and nothing more.

See also
Log

Definition at line 264 of file log.hpp.

Constructor & Destructor Documentation

◆ ~IndependentLogger()

virtual ~IndependentLogger ( )
virtual

Destructor.

Definition at line 267 of file log.hpp.

267{}

◆ IndependentLogger()

IndependentLogger ( const std::string &  name)
protected

Constructor.

Implementations must provide a logger name

Parameters
namethe logger name

Definition at line 281 of file log.hpp.

281: name_(name) {}
const std::string & name() const
Returns the Logger name.
Definition: log.hpp:273

Member Function Documentation

◆ removeSinks()

virtual void removeSinks ( )
pure virtual

◆ messages()

std::vector< std::string > & messages ( )

Definition at line 269 of file log.hpp.

269{ return messages_; }
std::vector< std::string > messages_
Definition: log.hpp:282
+ Here is the caller graph for this function:

◆ clear()

void clear ( )

Definition at line 101 of file log.cpp.

101{ messages_.clear(); }

◆ name()

const std::string & name ( ) const

Returns the Logger name.

Definition at line 273 of file log.hpp.

273{ return name_; }

Member Data Documentation

◆ messages_

std::vector<std::string> messages_
protected

Definition at line 282 of file log.hpp.

◆ name_

std::string name_
private

Definition at line 285 of file log.hpp.