log4shib::SyslogAppender(3)

log4shib::SyslogAppender(3) log4shib log4shib::SyslogAppender(3)

NAME

log4shib::SyslogAppender - SyslogAppender sends LoggingEvents to the local syslog system.

SYNOPSIS

#include <SyslogAppender.hh>

Inherits log4shib::LayoutAppender.

Public Member Functions


SyslogAppender (const std::string &name, const std::string &syslogName, int facility=LOG_USER)
Instantiate a SyslogAppender with given name and name and facility for syslog. virtual ~SyslogAppender ()
virtual bool reopen ()
Calls closelog(3) and openlog(3). virtual void close ()
Calls closelog(3) to close the syslog file descriptor.

Static Public Member Functions


static int toSyslogPriority (Priority::Value priority)
Translates a log4shib priority to a syslog priority.

Protected Member Functions


virtual void open ()
Calls openlog(3). virtual void _append (const LoggingEvent &event)
Sends a LoggingEvent to syslog.

Protected Attributes


const std::string _syslogName
int _facility

Additional Inherited Members

Detailed Description

SyslogAppender sends LoggingEvents to the local syslog system.

Constructor & Destructor Documentation

log4shib::SyslogAppender::SyslogAppender (const std::string & name, const std::string & syslogName, int facility = LOG_USER)

Instantiate a SyslogAppender with given name and name and facility for syslog. Note that the C syslog API is process global, so instantion of a second SyslogAppender will 'overwrite' the syslog name of the first.

Parameters

name The name of the Appender
syslogName The ident parameter in the openlog(3) call.
facility The syslog facility to log to. Defaults to LOG_USER.

virtual log4shib::SyslogAppender::~SyslogAppender () [virtual]

Member Function Documentation

virtual void log4shib::SyslogAppender::_append (const LoggingEvent & event) [protected], [virtual]

Sends a LoggingEvent to syslog.

Parameters

event the LoggingEvent to log.

Implements log4shib::AppenderSkeleton.

virtual void log4shib::SyslogAppender::close () [virtual]

Calls closelog(3) to close the syslog file descriptor.

Implements log4shib::AppenderSkeleton.

virtual void log4shib::SyslogAppender::open () [protected], [virtual]

Calls openlog(3).

virtual bool log4shib::SyslogAppender::reopen () [virtual]

Calls closelog(3) and openlog(3).

Reimplemented from log4shib::AppenderSkeleton.

static int log4shib::SyslogAppender::toSyslogPriority (Priority::Value priority) [static]

Translates a log4shib priority to a syslog priority.

Parameters

priority The log4shib priority.

Returns

the syslog priority.

Member Data Documentation

int log4shib::SyslogAppender::_facility [protected]

const std::string log4shib::SyslogAppender::_syslogName [protected]

Author

Generated automatically by Doxygen for log4shib from the source code.

Thu Apr 14 2022 Version 2.0.1