Logger interface. More...

#include <logger.h>

+ Inheritance diagram for clan::Logger:

Public Member Functions

 Logger ()
 Constructs a logger.
 
virtual ~Logger ()
 
void disable ()
 Disable logging.
 
void enable ()
 Enable logger for logging.
 
virtual void log (const std::string &type, const std::string &text)=0
 Log text.
 

Static Public Attributes

static std::vector< Logger * > instances
 Pointers to currently enabled logger.
 
static std::recursive_mutex mutex
 Logger mutex object.
 

Static Protected Member Functions

static StringFormat get_log_string (const std::string &type, const std::string &text)
 

Detailed Description

Logger interface.

Constructor & Destructor Documentation

◆ Logger()

clan::Logger::Logger ( )

Constructs a logger.

◆ ~Logger()

virtual clan::Logger::~Logger ( )
virtual

Member Function Documentation

◆ disable()

void clan::Logger::disable ( )

Disable logging.

◆ enable()

void clan::Logger::enable ( )

Enable logger for logging.

◆ get_log_string()

static StringFormat clan::Logger::get_log_string ( const std::string &  type,
const std::string &  text 
)
staticprotected

◆ log()

virtual void clan::Logger::log ( const std::string &  type,
const std::string &  text 
)
pure virtual

Log text.

Implemented in clan::ConsoleLogger, and clan::FileLogger.

Member Data Documentation

◆ instances

std::vector<Logger*> clan::Logger::instances
static

Pointers to currently enabled logger.

◆ mutex

std::recursive_mutex clan::Logger::mutex
static

Logger mutex object.


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