Galaxis Codebase  1.0.0
Team Galaxis software stack for the Carolo Cup 2023 - ROS2 based software
logging Class Reference

#include <logging.h>

Public Member Functions

 logging ()
 
void setLevel (loglevel level)
 
void setUsecolor (bool useColor)
 
unsigned getNoWarnings () const
 
unsigned getNoErrors () const
 
void log (loglevel level, const char *fmt,...)
 
void log (loglevel level, std::string &str)
 
void relog (loglevel level, const char *fmt,...)
 

Private Member Functions

bool doPrint (loglevel level) const
 

Private Attributes

bool lastrelog
 
loglevel minLevel
 
bool useColor
 
unsigned cntErrors
 
unsigned cntWarnings
 

Detailed Description

Definition at line 31 of file logging.h.

Constructor & Destructor Documentation

◆ logging()

logging::logging ( )

Member Function Documentation

◆ doPrint()

bool logging::doPrint ( loglevel  level) const
private

◆ getNoErrors()

unsigned logging::getNoErrors ( ) const
inline

Definition at line 61 of file logging.h.

61  {
62  return cntErrors;
63  };

References cntErrors.

◆ getNoWarnings()

unsigned logging::getNoWarnings ( ) const
inline

Definition at line 56 of file logging.h.

56  {
57  return cntWarnings;
58  };

References cntWarnings.

◆ log() [1/2]

void logging::log ( loglevel  level,
const char *  fmt,
  ... 
)

◆ log() [2/2]

void logging::log ( loglevel  level,
std::string &  str 
)

◆ relog()

void logging::relog ( loglevel  level,
const char *  fmt,
  ... 
)

◆ setLevel()

void logging::setLevel ( loglevel  level)
inline

Definition at line 46 of file logging.h.

46  {
47  minLevel = level;
48  };

References minLevel.

◆ setUsecolor()

void logging::setUsecolor ( bool  useColor)
inline

Definition at line 51 of file logging.h.

51  {
52  this->useColor = useColor;
53  };

References useColor.

Member Data Documentation

◆ cntErrors

unsigned logging::cntErrors
private

Definition at line 38 of file logging.h.

Referenced by getNoErrors().

◆ cntWarnings

unsigned logging::cntWarnings
private

Definition at line 39 of file logging.h.

Referenced by getNoWarnings().

◆ lastrelog

bool logging::lastrelog
private

Definition at line 34 of file logging.h.

◆ minLevel

loglevel logging::minLevel
private

Definition at line 35 of file logging.h.

Referenced by setLevel().

◆ useColor

bool logging::useColor
private

Definition at line 36 of file logging.h.

Referenced by setUsecolor().


The documentation for this class was generated from the following file:
logging::useColor
bool useColor
Definition: logging.h:36
logging::cntWarnings
unsigned cntWarnings
Definition: logging.h:39
logging::cntErrors
unsigned cntErrors
Definition: logging.h:38
logging::minLevel
loglevel minLevel
Definition: logging.h:35