Class Logger

Inheritance Relationships

Base Type

Derived Type

Class Documentation

class Logger : public gwm::ITelegram

Logger. Used to pass logging messages to outer printer functions. To accept messages, set the static member printer to self-defined functions.

Subclassed by StdTelegram

Public Functions

inline Logger()

Construct a new Logger object.

inline ~Logger()

Destroy the Logger object.

inline virtual void print(std::string message, LogLevel level, std::string fun_name, std::string file_name) override

Call printer to print a log. Log message Log level Caller function name The file where caller function is defined.

inline virtual void progress(std::size_t current, std::size_t total, std::string fun_name, std::string file_name) override

Report the progress of this algorithm. Current progress. Total number of progress.

inline virtual void progress(double percent, std::string fun_name, std::string file_name) override

Report the progress of this algorithm. Current percentage of total progress.

inline virtual bool stop() override

Tell the algorithm whether to stop. Yes, stop progress. No, don’t stop progress.