Tapkee
LoggingSingleton Class Reference

#include <logging.hpp>

Public Member Functions

LoggerImplementationget_logger_impl () const
 
void set_logger_impl (LoggerImplementation *i)
 
void enable_info ()
 
void disable_info ()
 
bool is_info_enabled ()
 
void message_info (const std::string &msg)
 
void enable_warning ()
 
void disable_warning ()
 
bool is_warning_enabled ()
 
void message_warning (const std::string &msg)
 
void enable_debug ()
 
void disable_debug ()
 
bool is_debug_enabled ()
 
void message_debug (const std::string &msg)
 
void enable_error ()
 
void disable_error ()
 
bool is_error_enabled ()
 
void message_error (const std::string &msg)
 
void enable_benchmark ()
 
void disable_benchmark ()
 
bool is_benchmark_enabled ()
 
void message_benchmark (const std::string &msg)
 

Static Public Member Functions

static LoggingSingletoninstance ()
 

Private Member Functions

 LoggingSingleton ()
 
 ~LoggingSingleton ()
 
 LoggingSingleton (const LoggingSingleton &ls)
 
void operator= (const LoggingSingleton &ls)
 

Private Attributes

LoggerImplementationimpl
 
bool info_enabled
 
bool warning_enabled
 
bool debug_enabled
 
bool error_enabled
 
bool benchmark_enabled
 

Detailed Description

Main logging singleton used by the library. Can use provided LoggerImplementation if necessary. By default uses DefaultLoggerImplementation.

Definition at line 72 of file logging.hpp.

Constructor & Destructor Documentation

◆ LoggingSingleton() [1/2]

LoggingSingleton ( )
private

Definition at line 75 of file logging.hpp.

◆ ~LoggingSingleton()

~LoggingSingleton ( )
private

Definition at line 83 of file logging.hpp.

◆ LoggingSingleton() [2/2]

LoggingSingleton ( const LoggingSingleton ls)
private

Member Function Documentation

◆ disable_benchmark()

void disable_benchmark ( )

Definition at line 117 of file logging.hpp.

◆ disable_debug()

void disable_debug ( )

Definition at line 115 of file logging.hpp.

◆ disable_error()

void disable_error ( )

Definition at line 116 of file logging.hpp.

◆ disable_info()

void disable_info ( )

Definition at line 113 of file logging.hpp.

◆ disable_warning()

void disable_warning ( )

Definition at line 114 of file logging.hpp.

◆ enable_benchmark()

void enable_benchmark ( )

Definition at line 117 of file logging.hpp.

◆ enable_debug()

void enable_debug ( )

Definition at line 115 of file logging.hpp.

◆ enable_error()

void enable_error ( )

Definition at line 116 of file logging.hpp.

◆ enable_info()

void enable_info ( )

Definition at line 113 of file logging.hpp.

◆ enable_warning()

void enable_warning ( )

Definition at line 114 of file logging.hpp.

◆ get_logger_impl()

LoggerImplementation* get_logger_impl ( ) const

getter for logger implementation

Returns
current logger implementation

Definition at line 108 of file logging.hpp.

◆ instance()

static LoggingSingleton& instance ( )
static
Returns
instance of the singleton

Definition at line 100 of file logging.hpp.

◆ is_benchmark_enabled()

bool is_benchmark_enabled ( )

Definition at line 117 of file logging.hpp.

◆ is_debug_enabled()

bool is_debug_enabled ( )

Definition at line 115 of file logging.hpp.

◆ is_error_enabled()

bool is_error_enabled ( )

Definition at line 116 of file logging.hpp.

◆ is_info_enabled()

bool is_info_enabled ( )

Definition at line 113 of file logging.hpp.

◆ is_warning_enabled()

bool is_warning_enabled ( )

Definition at line 114 of file logging.hpp.

◆ message_benchmark()

void message_benchmark ( const std::string &  msg)

Definition at line 117 of file logging.hpp.

◆ message_debug()

void message_debug ( const std::string &  msg)

Definition at line 115 of file logging.hpp.

◆ message_error()

void message_error ( const std::string &  msg)

Definition at line 116 of file logging.hpp.

◆ message_info()

void message_info ( const std::string &  msg)

Definition at line 113 of file logging.hpp.

◆ message_warning()

void message_warning ( const std::string &  msg)

Definition at line 114 of file logging.hpp.

◆ operator=()

void operator= ( const LoggingSingleton ls)
private

◆ set_logger_impl()

void set_logger_impl ( LoggerImplementation i)

setter for logger implementation

Parameters
ilogger implementation to be set

Definition at line 111 of file logging.hpp.

Member Data Documentation

◆ benchmark_enabled

bool benchmark_enabled
private

Definition at line 96 of file logging.hpp.

◆ debug_enabled

bool debug_enabled
private

Definition at line 94 of file logging.hpp.

◆ error_enabled

bool error_enabled
private

Definition at line 95 of file logging.hpp.

◆ impl

LoggerImplementation* impl
private

Definition at line 90 of file logging.hpp.

◆ info_enabled

bool info_enabled
private

Definition at line 92 of file logging.hpp.

◆ warning_enabled

bool warning_enabled
private

Definition at line 93 of file logging.hpp.


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