Poco::SyslogChannel Class Reference

This Unix-only channel works with the Unix syslog service. More...

#include <SyslogChannel.h>

List of all members.

Public Types

enum  Facility {
  SYSLOG_KERN = ( 0<<3), SYSLOG_USER = ( 1<<3), SYSLOG_MAIL = ( 2<<3), SYSLOG_DAEMON = ( 3<<3),
  SYSLOG_AUTH = ( 4<<3), SYSLOG_SYSLOG = ( 5<<3), SYSLOG_LPR = ( 6<<3), SYSLOG_NEWS = ( 7<<3),
  SYSLOG_UUCP = ( 8<<3), SYSLOG_CRON = ( 9<<3), SYSLOG_AUTHPRIV = (10<<3), SYSLOG_FTP = (11<<3),
  SYSLOG_LOCAL0 = (16<<3), SYSLOG_LOCAL1 = (17<<3), SYSLOG_LOCAL2 = (18<<3), SYSLOG_LOCAL3 = (19<<3),
  SYSLOG_LOCAL4 = (20<<3), SYSLOG_LOCAL5 = (21<<3), SYSLOG_LOCAL6 = (22<<3), SYSLOG_LOCAL7 = (23<<3)
}
enum  Option { SYSLOG_PID = 0x01, SYSLOG_CONS = 0x02, SYSLOG_NDELAY = 0x08, SYSLOG_PERROR = 0x20 }

Public Member Functions

void close ()
 Opens the SyslogChannel.
std::string getProperty (const std::string &name) const
void log (const Message &msg)
 Closes the SyslogChannel.
void open ()
 Creates a SyslogChannel with the given name, options and facility.
void setProperty (const std::string &name, const std::string &value)
 Sens the message's text to the syslog service.
 SyslogChannel (const std::string &name, int options=SYSLOG_CONS, int facility=SYSLOG_USER)
 Creates a SyslogChannel.
 SyslogChannel ()

Static Public Attributes

static const std::string PROP_FACILITY
static const std::string PROP_NAME
 Returns the value of the property with the given name.
static const std::string PROP_OPTIONS

Protected Member Functions

 ~SyslogChannel ()

Static Protected Member Functions

static int getPrio (const Message &msg)

Private Attributes

int _facility
std::string _name
bool _open
int _options

Detailed Description

This Unix-only channel works with the Unix syslog service.

Definition at line 50 of file SyslogChannel.h.


Member Enumeration Documentation

Enumerator:
SYSLOG_KERN 
SYSLOG_USER 

kernel messages

SYSLOG_MAIL 

random user-level messages

SYSLOG_DAEMON 

mail system

SYSLOG_AUTH 

system daemons

SYSLOG_SYSLOG 

security/authorization messages

SYSLOG_LPR 

messages generated internally by syslogd

SYSLOG_NEWS 

line printer subsystem

SYSLOG_UUCP 

network news subsystem

SYSLOG_CRON 

UUCP subsystem.

SYSLOG_AUTHPRIV 

clock daemon

SYSLOG_FTP 

security/authorization messages (private)

SYSLOG_LOCAL0 

ftp daemon

SYSLOG_LOCAL1 

reserved for local use

SYSLOG_LOCAL2 

reserved for local use

SYSLOG_LOCAL3 

reserved for local use

SYSLOG_LOCAL4 

reserved for local use

SYSLOG_LOCAL5 

reserved for local use

SYSLOG_LOCAL6 

reserved for local use

SYSLOG_LOCAL7 

reserved for local use

Definition at line 62 of file SyslogChannel.h.

Enumerator:
SYSLOG_PID 
SYSLOG_CONS 

log the pid with each message

SYSLOG_NDELAY 

log on the console if errors in sending

SYSLOG_PERROR 

don't delay open

Definition at line 54 of file SyslogChannel.h.


Constructor & Destructor Documentation

Poco::SyslogChannel::SyslogChannel (  ) 
Poco::SyslogChannel::SyslogChannel ( const std::string &  name,
int  options = SYSLOG_CONS,
int  facility = SYSLOG_USER 
)

Creates a SyslogChannel.

Poco::SyslogChannel::~SyslogChannel (  )  [protected]

Member Function Documentation

void Poco::SyslogChannel::close (  ) 

Opens the SyslogChannel.

static int Poco::SyslogChannel::getPrio ( const Message &  msg  )  [static, protected]
std::string Poco::SyslogChannel::getProperty ( const std::string &  name  )  const

Sets the property with the given value.

The following properties are supported: name: The name used to identify the source of log messages. facility: The facility added to each log message. See the Facility enumeration for a list of supported values. options: The logging options. See the Option enumeration for a list of supported values.

void Poco::SyslogChannel::log ( const Message &  msg  ) 

Closes the SyslogChannel.

void Poco::SyslogChannel::open (  ) 

Creates a SyslogChannel with the given name, options and facility.

void Poco::SyslogChannel::setProperty ( const std::string &  name,
const std::string &  value 
)

Sens the message's text to the syslog service.


Member Data Documentation

Definition at line 123 of file SyslogChannel.h.

std::string Poco::SyslogChannel::_name [private]

Definition at line 121 of file SyslogChannel.h.

Definition at line 124 of file SyslogChannel.h.

Definition at line 122 of file SyslogChannel.h.

const std::string Poco::SyslogChannel::PROP_FACILITY [static]

Definition at line 113 of file SyslogChannel.h.

const std::string Poco::SyslogChannel::PROP_NAME [static]

Returns the value of the property with the given name.

Definition at line 112 of file SyslogChannel.h.

const std::string Poco::SyslogChannel::PROP_OPTIONS [static]

Definition at line 114 of file SyslogChannel.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


pluginlib
Author(s): Tully Foote and Eitan Marder-Eppstein
autogenerated on Fri Jan 11 11:39:02 2013