AnCH Framework 0.1
Another C++ Hack Framework
 
Loading...
Searching...
No Matches
anch::logger::Logger Class Reference

#include <logger.hpp>

+ Collaboration diagram for anch::logger::Logger:

Public Member Functions

 Logger (const std::string &name, const anch::logger::Level level, const std::vector< anch::logger::Writer * > &writers)
 
virtual ~Logger ()
 
template<typename T, typename... Q>
void trace (const T &value, const Q &... values) const noexcept
 
template<typename T, typename... Q>
void debug (const T &value, const Q &... values) const noexcept
 
template<typename T, typename... Q>
void info (const T &value, const Q &... values) const noexcept
 
template<typename T, typename... Q>
void warn (const T &value, const Q &... values) const noexcept
 
template<typename T, typename... Q>
void error (const T &value, const Q &... values) const noexcept
 
template<typename T, typename... Q>
void fatal (const T &value, const Q &... values) const noexcept
 

Detailed Description

Logger class.
Aims to provide logging facilities.

Logging levels are:

  • TRACE
  • DEBUG
  • INFO
  • WARN
  • ERROR
  • FATAL
Author
Vincent Lachenal

Constructor & Destructor Documentation

◆ Logger()

anch::logger::Logger::Logger ( const std::string & name,
const anch::logger::Level level,
const std::vector< anch::logger::Writer * > & writers )

Logger constructor.

Parameters
nameLogger name
levelThe logging level to set
writersThe writers list

◆ ~Logger()

virtual anch::logger::Logger::~Logger ( )
virtual

Logger destructor

Member Function Documentation

◆ debug()

template<typename T, typename... Q>
void anch::logger::Logger::debug ( const T & value,
const Q &... values ) const
noexcept

Concatenate message and log it in DEBUG level

Parameters
valueThe first value of the message to concatenate
valuesThe other values of the message to concatenate

◆ error()

template<typename T, typename... Q>
void anch::logger::Logger::error ( const T & value,
const Q &... values ) const
noexcept

Concatenate message and log it in ERROR level

Parameters
valueThe first value of the message to concatenate
valuesThe other values of the message to concatenate

◆ fatal()

template<typename T, typename... Q>
void anch::logger::Logger::fatal ( const T & value,
const Q &... values ) const
noexcept

Concatenate message and log it in FATAL level

Parameters
valueThe first value of the message to concatenate
valuesThe other values of the message to concatenate

◆ info()

template<typename T, typename... Q>
void anch::logger::Logger::info ( const T & value,
const Q &... values ) const
noexcept

Concatenate message and log it in INFO level

Parameters
valueThe first value of the message to concatenate
valuesThe other values of the message to concatenate

◆ trace()

template<typename T, typename... Q>
void anch::logger::Logger::trace ( const T & value,
const Q &... values ) const
noexcept

Concatenate message and log it in TRACE level

Parameters
valueThe first value of the message to concatenate
valuesThe other values of the message to concatenate

◆ warn()

template<typename T, typename... Q>
void anch::logger::Logger::warn ( const T & value,
const Q &... values ) const
noexcept

Concatenate message and log it in WARN level

Parameters
valueThe first value of the message to concatenate
valuesThe other values of the message to concatenate

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