Class Broadcaster¶
Defined in File common.h
Class Documentation¶
-
class Broadcaster¶
logs a narrative message and publishes it on Topic::BROADCAST
Captures a reference to a publisher and the source daemon name at construction time so that call sites need only supply the caller function name and message (and severity, for emit). The publisher reference is to the daemon’s Common::PubSub, which may be null at the time this Broadcaster is constructed and gets populated later by init_pubsub.
Public Functions
-
inline void notice(const std::string &function, const std::string &message)¶
publish a NOTICE severity broadcast
-
inline void warning(const std::string &function, const std::string &message)¶
publish a WARNING severity broadcast
-
inline void error(const std::string &function, const std::string &message)¶
publish an ERROR severity broadcast
-
void emit(const std::string &function, const std::string &severity, const std::string &message)¶
-
inline void notice(const std::string &function, const std::string &message)¶