38 #ifndef ASYNC_COMM_MESSAGE_HANDLER_H 39 #define ASYNC_COMM_MESSAGE_HANDLER_H 58 virtual void debug(
const std::string& message) = 0;
59 virtual void info(
const std::string& message) = 0;
60 virtual void warn(
const std::string& message) = 0;
61 virtual void error(
const std::string& message) = 0;
62 virtual void fatal(
const std::string& message) = 0;
72 inline void debug(
const std::string &message)
override { std::cout <<
"[async_comm][DEBUG]: " << message << std::endl; }
73 inline void info(
const std::string &message)
override { std::cout <<
"[async_comm][INFO]: " << message << std::endl; }
74 inline void warn(
const std::string &message)
override { std::cerr <<
"[async_comm][WARN]: " << message << std::endl; }
75 inline void error(
const std::string &message)
override { std::cerr <<
"[async_comm][ERROR]: " << message << std::endl; }
76 inline void fatal(
const std::string &message)
override { std::cerr <<
"[async_comm][FATAL]: " << message << std::endl; }
81 #endif // ASYNC_COMM_MESSAGE_HANDLER_H virtual void warn(const std::string &message)=0
void error(const std::string &message) override
virtual void error(const std::string &message)=0
void info(const std::string &message) override
virtual void fatal(const std::string &message)=0
void fatal(const std::string &message) override
Abstract base class for message handler.
void warn(const std::string &message) override
Default message handler that outputs to stdout and stderr.
void debug(const std::string &message) override
virtual void info(const std::string &message)=0
virtual void debug(const std::string &message)=0