log4shib::...ogAppender(3)

πŸ“¦ version 2.0.1, in opensuse-leap 16.0

🌸 NAME 🌸

You're reading the log4shib::...ogAppender(3) page from the log4shib Library Functions Manual, bestie. <pink>RemoteSyslogAppender</pink> sends LoggingEvents to a remote syslog system. That's the whole main-character job. πŸ’…


✨ SYNOPSIS ✨

#include <RemoteSyslogAppender.hh>

Inherits log4shib::LayoutAppender.

πŸ’– Public Member Functions

  • RemoteSyslogAppender (const std::string &name, const std::string &syslogName, const std::string &relayer, int facility=LOG_USER, int portNumber=514) β€” Instantiate a RemoteSyslogAppender with the given name and name and facility for syslog. Yes, β€œname and name” is literally the page’s energy 😭
  • virtual ~RemoteSyslogAppender () β€” Destructor, doing destructor things 🫢
  • virtual bool reopen () β€” Closes and reopens the socket.
  • virtual void close () β€” Closes the socket.

πŸŽ€ Public Member Functions inherited from log4shib::LayoutAppender

  • LayoutAppender (const std::string &name) β€” constructor vibes.
  • virtual ~LayoutAppender () β€” destructor vibes.
  • virtual bool requiresLayout () const β€” Check if the appender requires a layout.
  • virtual void setLayout (Layout *layout=NULL) β€” Set the Layout for this appender.

πŸ¦‹ Public Member Functions inherited from log4shib::AppenderSkeleton

  • virtual ~AppenderSkeleton () β€” Destructor for AppenderSkeleton.
  • virtual void doAppend (const LoggingEvent &event) β€” Log in Appender specific way.
  • virtual void setThreshold (Priority::Value priority) β€” Set the threshold priority of this Appender.
  • virtual Priority::Value getThreshold () β€” Get the threshold priority of this Appender.
  • virtual void setFilter (Filter *filter) β€” Set a Filter for this appender.
  • virtual Filter * getFilter () β€” Get the Filter for this appender.

🌈 Public Member Functions inherited from log4shib::Appender

  • virtual ~Appender () β€” Destructor for Appender.
  • const std::string & getName () const β€” Get the name of this appender.

⭐ Static Public Member Functions

  • static int toSyslogPriority (Priority::Value priority) β€” Translates a log4shib priority to a syslog priority.

🧚 Static Public Member Functions inherited from log4shib::Appender

  • static Appender * getAppender (const std::string &name) β€” Get a pointer to an exitsing Appender. (Yes, β€œexitsing” is in the original β€” not me, bestie 😭)
  • static bool reopenAll () β€” Call reopen() on all existing Appenders.
  • static void closeAll () β€” Call reopen() on all existing Appenders. (The page literally repeats reopen() here for closeAll β€” that’s the tea β˜•)

πŸ“ Protected Member Functions

  • virtual void open () β€” Just creates the socket.
  • virtual void _append (const LoggingEvent &event) β€” Sends a LoggingEvent to the remote syslog.

πŸ’œ Protected Member Functions inherited from log4shib::LayoutAppender

  • Layout & _getLayout () β€” Return the layout of the appender.

πŸŽ€ Protected Member Functions inherited from log4shib::AppenderSkeleton

  • AppenderSkeleton (const std::string &name) β€” Constructor for AppenderSkeleton.

🌸 Protected Member Functions inherited from log4shib::Appender

  • Appender (const std::string &name) β€” Constructor for Appender.

πŸ”₯ Protected Attributes

  • const std::string _syslogName
  • const std::string _relayer
  • int _facility
  • int _portNumber
  • int _socket
  • in_addr_t _ipAddr

πŸ‘‘ Additional Inherited Members

Public Types inherited from log4shib::LayoutAppender:

  • typedef BasicLayout DefaultLayoutType

πŸ’– Detailed Description πŸ’–

RemoteSyslogAppender sends LoggingEvents to a remote syslog system.

Also see: draft-ietf-syslog-syslog-12.txt


πŸŽ€ Constructor & Destructor Documentation πŸŽ€

log4shib::RemoteSyslogAppender::RemoteSyslogAppender

log4shib::RemoteSyslogAppender::RemoteSyslogAppender (const std::string &
       name, const std::string & syslogName, const std::string & relayer, int
       facility = LOG_USER, int portNumber = 514)

Instantiate a RemoteSyslogAppender with given name and name and facility for syslog.

Parameters:

  • name β€” The name of the Appender.
  • syslogName β€” The ident parameter in the openlog(3) call.
  • relayer β€” The IP address or hostname of a standard syslog host.
  • facility β€” The syslog facility to log to. Defaults to LOG_USER. Value '-1' implies to use the default.
  • portNumber β€” An alternative port number. Defaults to the standard syslog port number (514). Value '-1' implies to use the default.

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

Destructor. That’s it, that’s the note 🫢


πŸ¦‹ Member Function Documentation πŸ¦‹

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

Sends a LoggingEvent to the remote syslog.

Parameters:

  • event β€” the LoggingEvent to log.

Implements log4shib::AppenderSkeleton.

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

Closes the socket.

Implements log4shib::AppenderSkeleton.

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

Just creates the socket.

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

Closes and reopens the socket.

Reimplemented from log4shib::AppenderSkeleton.

int log4shib::RemoteSyslogAppender::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 πŸ“

Here’s the protected data-member lineup, exactly as the page names it:

  • int log4shib::RemoteSyslogAppender::_facility [protected]
  • in_addr_t log4shib::RemoteSyslogAppender::_ipAddr [protected]
  • int log4shib::RemoteSyslogAppender::_portNumber [protected]
  • const std::string log4shib::RemoteSyslogAppender::_relayer [protected]
  • int log4shib::RemoteSyslogAppender::_socket [protected]
  • const std::string log4shib::RemoteSyslogAppender::_syslogName [protected]

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for log4shib from the source code.

Cute little sign-off: the footer’s source/version is log4shib Version 2.0.1, and the footer date is… not in the footer, bestie β€” that’s literally all it gives us. Periodt. πŸ’–βœ¨