LOG4SHIB::SYSLOGAPPENDER(3)

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

🌸 NAME 🌸

okay so bestie, this is the log4shib::SyslogAppender(3) page from the Library Functions Manual β€” all about the log4shib::SyslogAppender class. The whole point, no cap: 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 the given name, syslog name, and facility for syslog. 🫢
  • virtual ~SyslogAppender () β€” the destructor. That's the whole line, bestie.
  • virtual bool reopen () β€” Calls closelog(3) and openlog(3).
  • virtual void close () β€” Calls closelog(3) to close the syslog file descriptor.

🫢 Public Member Functions inherited from log4shib::LayoutAppender 🫢

  • LayoutAppender (const std::string &name) β€” constructor inherited from log4shib::LayoutAppender.
  • virtual ~LayoutAppender () β€” destructor inherited from log4shib::LayoutAppender.
  • 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. The page really says "exitsing"; I'm just the messenger. πŸ’€
  • static bool reopenAll () β€” Call reopen() on all existing Appenders.
  • static void closeAll () β€” Call reopen() on all existing Appenders. Yes, closeAll says reopen() here β€” not me editing it, fr fr.

πŸ›‘οΈ Protected Member Functions πŸ›‘οΈ

  • virtual void open () β€” Calls openlog(3).
  • virtual void _append (const LoggingEvent &event) β€” Sends a LoggingEvent to 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
  • int _facility

πŸ¦‹ Additional Inherited Members πŸ¦‹

🌸 Public Types inherited from log4shib::LayoutAppender 🌸

  • typedef BasicLayout DefaultLayoutType

πŸ’– DETAILED DESCRIPTION πŸ’–

SyslogAppender sends LoggingEvents to the local syslog system. That's the whole detailed description, short and iconic. ✨

πŸŽ€ 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 (their spelling, not mine) of a second SyslogAppender will 'overwrite' the syslog name of the first.

⚠️ big caveat: that process-global thing is real, bestie. A second SyslogAppender will 'overwrite' the first one's syslog name. No cap.

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]

The destructor signature, exactly as listed. No extra prose in the source, so no invented lore from me. 🫢

🌈 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.

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]

No description on the page, just the member. Keep it cute and protected. πŸ“

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

No description on the page, just the member. Same energy. πŸ’œ

πŸ‘‘ AUTHOR πŸ‘‘

Generated automatically by Doxygen for log4shib from the source code. iconic behavior, honestly.


okay that's the whole page, bestie. 🫢 Source/version check: this is log4shib, Version 2.0.1, and the footer doesn't give a date, so I'm not inventing one. log4shib::SyslogAppender(3) signing off. πŸŽ€πŸ’œ