#include <rlog/SyslogNode.h>
Inheritance diagram for rlog::SyslogNode:
Public Member Functions | |
SyslogNode (const char *ident) | |
SyslogNode (const char *ident, int option, int facility) | |
See syslog(3) for possible values of option and facility arguments. | |
void | subscribeTo (RLogNode *node) |
Protected Member Functions | |
virtual void | publish (const RLogData &data) |
Publish data. | |
Protected Attributes | |
const char * | ident |
int | option |
int | facility |
This logs all subscribed messages using syslog.
For example:
int main(int argc, char **argv) { // tell RLog the program name.. RLog_Init( argv[0] ); // log to syslog, prepending "rlog-test" to every line SyslogNode slog( "rlog-test" ); // show all warning and error messages, no matter what component they // come from. stdlog.subscribeTo( GetGlobalChannel( "warning" )); stdlog.subscribeTo( GetGlobalChannel( "error" )); }
RLOG_CHANNEL()
void SyslogNode::publish | ( | const RLogData & | data | ) | [protected, virtual] |
Publish data.
This iterates over the list of subscribers which have stated interest and sends them the data.
Reimplemented from rlog::RLogNode.