Class LoggerWrapper

Class Documentation

class Acts::LoggerWrapper

Class that contains (but doesn’t own) a logger instance.

Is callable so can be used with the logging macros.

Public Functions

LoggerWrapper() = delete
LoggerWrapper(const Logger &logger)

Constructor ensuring a logger instance is given.

Parameters
  • logger:

bool doPrint(const Logging::Level &lvl) const

Directly expose whether the contained logger will print at a level.

Return

Whether to print at this level or not.

Parameters
  • lvl: The level to check

void log(const Logging::Level &lvl, const std::string &input) const

Add a logging message at a given level.

Parameters
  • lvl: The level to print at

  • input: text of debug message

const Logger &operator()() const

Call operator that returns the contained logger instance.

Enables using the logging macros ACTS_* when an instance of this class is assigned to a local variable logger.

Return

Reference to the logger instance.