0.2.0
Loading...
Searching...
No Matches
Logger Class Reference

Utility class for logging. More...

Public Member Functions

 Logger ()
 Default constructor.
 
 Logger (const Logger &)=delete
 Copy constructor.
 
 Logger (const std::string &logpath)
 Constructor.
 
 Logger (Logger &&)=default
 Move constructor.
 
Loggeroperator= (const Logger &)=delete
 Copy assignment operator.
 
Loggeroperator= (Logger &&)=default
 Move assignment operator.
 
 ~Logger ()
 Destructor.
 

Static Public Member Functions

static const std::shared_ptr< spdlog::sinks::ringbuffer_sink_mt > & GetRingBufferSink ()
 Returns the ring buffer sink.
 

Detailed Description

Utility class for logging.

Use the Macros to do logging, as they can be turned off during compilation

  • LOG_DATA("Message {} {}", variable1, variable 2);
  • LOG_TRACE("Message {} {}", variable1, variable 2);
  • LOG_DEBUG("Message {} {}", variable1, variable 2);
  • LOG_INFO("Message {} {}", variable1, variable 2);
  • LOG_WARN("Message {} {}", variable1, variable 2);
  • LOG_ERROR("Message {} {}", variable1, variable 2);
  • LOG_CRITICAL("Message {} {}", variable1, variable 2);

Constructor & Destructor Documentation

◆ Logger()

Logger::Logger ( const std::string & logpath)
explicit

Constructor.

Parameters
[in]logpathRelative filepath to the logfile

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