rlog::SyslogNode Class Reference

Logs subscribed messages using syslog. More...

#include <rlog/SyslogNode.h>

Inheritance diagram for rlog::SyslogNode:

rlog::RLogNode List of all members.

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

Detailed Description

Logs subscribed messages using syslog.

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" ));
  }

See also:
RLogChannel

RLOG_CHANNEL()

Author:
Valient Gough


Member Function Documentation

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.


The documentation for this class was generated from the following files:
Generated on Mon Nov 20 22:57:46 2006 for rlog by  doxygen 1.5.0